1 module unde.games.dizzy.omega.dialogs; 2 3 import derelict.opengl3.gl; 4 import unde.games.dizzy.omega.main; 5 import unde.games.object; 6 import unde.games.renderer; 7 import unde.global_state; 8 9 class Dialogs:StaticGameObject 10 { 11 bool inventory; 12 string model; 13 float[4][] colors; 14 int color; 15 16 this(MainGameObject root) 17 { 18 colors = 19 [ 20 [0.0, 0.0, 1.0, 1.0], 21 [1.0, 0.0, 0.0, 1.0], 22 [1.0, 0.0, 1.0, 1.0], 23 [0.0, 1.0, 0.0, 1.0], 24 [0.0, 1.0, 1.0, 1.0], 25 [1.0, 1.0, 0.0, 1.0], 26 [1.0, 1.0, 1.0, 1.0] 27 ]; 28 29 super(root); 30 } 31 32 enum DIALOG_COLOR 33 { 34 BLUE = 0, 35 GREEN = 1, 36 RED = 2, 37 WHITE = 3, 38 } 39 40 void show_dialback(int x1, int y1, int x2=-100, int y2=-100, 41 DIALOG_COLOR color = DIALOG_COLOR.BLUE) 42 { 43 if (x2 == -100) x2 = x1; 44 if (y2 == -100) y2 = y1; 45 46 glBindTexture(GL_TEXTURE_2D, 0); 47 glBegin(GL_POLYGON); 48 final switch (color) 49 { 50 case DIALOG_COLOR.BLUE: 51 glColor4f(0.0, 0.0, 0.5, 0.8); 52 break; 53 case DIALOG_COLOR.GREEN: 54 glColor4f(0.0, 0.15, 0.0, 0.8); 55 break; 56 case DIALOG_COLOR.RED: 57 glColor4f(0.15, 0.0, 0.0, 0.8); 58 break; 59 case DIALOG_COLOR.WHITE: 60 glColor4f(0.15, 0.15, 0.15, 0.8); 61 break; 62 } 63 glVertex3f(-x1, -y2, -9.9); 64 glVertex3f( x2, -y2, -9.9); 65 glVertex3f( x2, y1, -9.9); 66 glVertex3f(-x1, y1, -9.9); 67 glEnd(); 68 } 69 70 override void draw(GlobalState gs) 71 { 72 auto dz = cast(DizzyOmega) root; 73 auto lang = dz.lang; 74 75 final switch (dz.state) 76 { 77 case STATE.NO_DIALOGS: 78 break; 79 80 case STATE.HELP: 81 glEnable(GL_COLOR_MATERIAL); 82 83 final switch(lang) 84 { 85 case dz.LANG.EN: 86 show_dialback(21, 10); 87 88 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 89 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 90 glTranslatef(-20.0, 9.0, 0.0); 91 glColor4f(1.0, 1.0, 1.0, 1.0); 92 print_text(" Help about keys\n"~ 93 "\n"~ 94 " ESCAPE - this help\n"~ 95 "\n"~ 96 " Up K\n"~ 97 " Left Down Right OR Z M X\n"~ 98 "\n"~ 99 " SPACE - Jump\n"~ 100 " ENTER - Take, Use item\n"~ 101 " Ctrl+S - Save\n"~ 102 " Ctrl+L - Load\n"~ 103 " Ctrl+R - Restart\n"~ 104 " U - On/Off Music\n"~ 105 " O - On/Off Sounds\n"~ 106 "\n"~ 107 " 1 - Change suit\n"~ 108 " 2 - Change language\n"~ 109 " Q - Exit"); 110 break; 111 112 case dz.LANG.RU: 113 show_dialback(21, 10); 114 115 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 116 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 117 glTranslatef(-20.0, 9.0, 0.0); 118 glColor4f(1.0, 1.0, 1.0, 1.0); 119 print_text(" Справка по клавишам\n"~ 120 "\n"~ 121 " ESCAPE - эта справка\n"~ 122 "\n"~ 123 " Вверх K\n"~ 124 " Влево Вниз Вправо ИЛИ Z M X\n"~ 125 "\n"~ 126 " Пробел - прыжок\n"~ 127 "ENTER - Подобрать, Использовать предмет\n"~ 128 " Ctrl+S - Сохранить\n"~ 129 " Ctrl+L - Загрузить\n"~ 130 " Ctrl+R - Сначала\n"~ 131 " U - Вкл/Выкл Музыку\n"~ 132 " O - Вкл/Выкл Звуки\n"~ 133 "\n"~ 134 " 1 - Сменить костюм\n"~ 135 " 2 - Сменить язык\n"~ 136 " Q - Выход"); 137 break; 138 } 139 140 glDisable(GL_COLOR_MATERIAL); 141 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 142 break; 143 144 case STATE.INVENTORY: 145 146 glEnable(GL_COLOR_MATERIAL); 147 148 show_dialback(15, 8); 149 150 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 151 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 152 glTranslatef(-5.0, 7.0, 0.0); 153 glColor4f(1.0, 1.0, 0.0, 1.0); 154 final switch(lang) 155 { 156 case dz.LANG.EN: 157 print_text("Inventory"); 158 break; 159 case dz.LANG.RU: 160 print_text("Инвентарий"); 161 break; 162 } 163 164 glTranslatef(-6.0, 0.0, 0.0); 165 166 foreach(i, inv; dz.inventory) 167 { 168 glDisable(GL_COLOR_MATERIAL); 169 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 170 glTranslatef(0.0, -2.5, -15.0); 171 recursive_render(gs, dz.models[dz.items[inv].model]); 172 glTranslatef(1.0, 0.5, 15.0); 173 174 glDisable(GL_LIGHTING); 175 glEnable(GL_COLOR_MATERIAL); 176 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 177 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 178 if (dz.inv_num == i) 179 glColor4fv(colors[(color/16)%7].ptr); 180 else 181 glColor4f(1.0, 1.0, 1.0, 1.0); 182 final switch(lang) 183 { 184 case dz.LANG.EN: 185 print_text(dz.names[dz.items[inv].model]); 186 break; 187 case dz.LANG.RU: 188 print_text(dz.names_ru[dz.items[inv].model]); 189 break; 190 } 191 glTranslatef(-1.0, 0.0, 0.0); 192 } 193 194 if (dz.inv_num == -1) 195 glColor4fv(colors[(color/16)%7].ptr); 196 else 197 glColor4f(1.0, 1.0, 1.0, 1.0); 198 199 glTranslatef(0.0, -2.0, 0.0); 200 final switch(lang) 201 { 202 case dz.LANG.EN: 203 print_text("Nothing to drop"); 204 break; 205 case dz.LANG.RU: 206 print_text("Ничего не бросать"); 207 break; 208 } 209 210 glDisable(GL_COLOR_MATERIAL); 211 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 212 break; 213 214 case STATE.ENERGY_STAR: 215 glEnable(GL_COLOR_MATERIAL); 216 217 final switch(lang) 218 { 219 case dz.LANG.EN: 220 show_dialback(6, 4); 221 222 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 223 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 224 glTranslatef(-5.0, 3.0, 0.0); 225 glColor4f(1.0, 1.0, 0.0, 1.0); 226 print_text("Well Done!"); 227 228 glColor4f(1.0, 1.0, 1.0, 1.0); 229 glTranslatef(0.0, -2.0, 0.0); 230 print_text("You found\n"~ 231 "an energy\n"~ 232 " star!"); 233 break; 234 235 case dz.LANG.RU: 236 show_dialback(8, 4); 237 238 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 239 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 240 glTranslatef(-7.0, 3.0, 0.0); 241 glColor4f(1.0, 1.0, 0.0, 1.0); 242 print_text(" Отлично!"); 243 244 glColor4f(1.0, 1.0, 1.0, 1.0); 245 glTranslatef(0.0, -2.0, 0.0); 246 print_text(" Вы нашли\n"~ 247 "энергетическую\n"~ 248 " звёздочку!"); 249 } 250 251 glDisable(GL_COLOR_MATERIAL); 252 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 253 break; 254 255 case STATE.TOO_MANY_ITEMS: 256 glEnable(GL_COLOR_MATERIAL); 257 258 final switch(lang) 259 { 260 case dz.LANG.EN: 261 show_dialback(5, 2); 262 263 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 264 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 265 glTranslatef(-4.0, 1.0, 0.0); 266 glColor4f(1.0, 0.0, 0.0, 1.0); 267 print_text("Too many\n"~ 268 " items"); 269 break; 270 271 case dz.LANG.RU: 272 show_dialback(8, 2); 273 274 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 275 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 276 glTranslatef(-7.0, 1.0, 0.0); 277 glColor4f(1.0, 0.0, 0.0, 1.0); 278 print_text("Слишком много\n"~ 279 " предметов"); 280 } 281 282 glDisable(GL_COLOR_MATERIAL); 283 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 284 break; 285 286 case STATE.PIERCED_BY_STALAGMITE: 287 glEnable(GL_COLOR_MATERIAL); 288 289 final switch(lang) 290 { 291 case dz.LANG.EN: 292 show_dialback(9, 3); 293 294 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 295 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 296 glTranslatef(-8.0, 2.0, 0.0); 297 glColor4f(1.0, 1.0, 1.0, 1.0); 298 print_text("You was pirced\n"~ 299 " by stalagmite"); 300 301 glTranslatef(0.0, -3.0, 0.0); 302 glColor4f(1.0, 0.0, 0.0, 1.0); 303 print_text("You lose a life"); 304 break; 305 306 case dz.LANG.RU: 307 show_dialback(9, 3); 308 309 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 310 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 311 glTranslatef(-8.0, 2.0, 0.0); 312 glColor4f(1.0, 1.0, 1.0, 1.0); 313 print_text(" Вы проткнуты\n"~ 314 " сталагмитом"); 315 316 glTranslatef(0.0, -3.0, 0.0); 317 glColor4f(1.0, 0.0, 0.0, 1.0); 318 print_text("Вы теряете жизнь"); 319 } 320 321 glDisable(GL_COLOR_MATERIAL); 322 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 323 break; 324 325 case STATE.PIERCED_BY_STALACTITE: 326 glEnable(GL_COLOR_MATERIAL); 327 328 final switch(lang) 329 { 330 case dz.LANG.EN: 331 show_dialback(9, 3); 332 333 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 334 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 335 glTranslatef(-8.0, 2.0, 0.0); 336 glColor4f(1.0, 1.0, 1.0, 1.0); 337 print_text("You was pierced\n"~ 338 " by stalactite"); 339 340 glTranslatef(0.0, -3.0, 0.0); 341 glColor4f(1.0, 0.0, 0.0, 1.0); 342 print_text("You lose a life"); 343 break; 344 345 case dz.LANG.RU: 346 show_dialback(9, 3); 347 348 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 349 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 350 glTranslatef(-8.0, 2.0, 0.0); 351 glColor4f(1.0, 1.0, 1.0, 1.0); 352 print_text(" Вы проткнуты\n"~ 353 " сталактитом"); 354 355 glTranslatef(0.0, -3.0, 0.0); 356 glColor4f(1.0, 0.0, 0.0, 1.0); 357 print_text("Вы теряете жизнь"); 358 } 359 360 glDisable(GL_COLOR_MATERIAL); 361 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 362 break; 363 364 case STATE.HIT_BY_METEORITE: 365 glEnable(GL_COLOR_MATERIAL); 366 367 final switch(lang) 368 { 369 case dz.LANG.EN: 370 show_dialback(9, 3); 371 372 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 373 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 374 glTranslatef(-8.0, 2.0, 0.0); 375 glColor4f(1.0, 1.0, 1.0, 1.0); 376 print_text(" You were hit\n"~ 377 " by meteorite"); 378 379 glTranslatef(0.0, -3.0, 0.0); 380 glColor4f(1.0, 0.0, 0.0, 1.0); 381 print_text("You lose a life"); 382 break; 383 384 case dz.LANG.RU: 385 show_dialback(9, 3); 386 387 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 388 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 389 glTranslatef(-8.0, 2.0, 0.0); 390 glColor4f(1.0, 1.0, 1.0, 1.0); 391 print_text(" Вас прибило\n"~ 392 " метеоритом"); 393 394 glTranslatef(0.0, -3.0, 0.0); 395 glColor4f(1.0, 0.0, 0.0, 1.0); 396 print_text("Вы теряете жизнь"); 397 } 398 399 glDisable(GL_COLOR_MATERIAL); 400 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 401 break; 402 403 case STATE.DISSOLVED_IN_ACID: 404 glEnable(GL_COLOR_MATERIAL); 405 406 final switch(lang) 407 { 408 case dz.LANG.EN: 409 show_dialback(9, 3); 410 411 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 412 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 413 glTranslatef(-8.0, 2.0, 0.0); 414 glColor4f(1.0, 1.0, 1.0, 1.0); 415 print_text(" You dissolved\n"~ 416 " in acid"); 417 418 glTranslatef(0.0, -3.0, 0.0); 419 glColor4f(1.0, 0.0, 0.0, 1.0); 420 print_text("You lose a life"); 421 break; 422 423 case dz.LANG.RU: 424 show_dialback(9, 3); 425 426 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 427 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 428 glTranslatef(-8.0, 2.0, 0.0); 429 glColor4f(1.0, 1.0, 1.0, 1.0); 430 print_text("Вы растворились\n"~ 431 " в кислоте"); 432 433 glTranslatef(0.0, -3.0, 0.0); 434 glColor4f(1.0, 0.0, 0.0, 1.0); 435 print_text("Вы теряете жизнь"); 436 } 437 438 glDisable(GL_COLOR_MATERIAL); 439 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 440 break; 441 442 case STATE.BURNED_IN_LAVA: 443 glEnable(GL_COLOR_MATERIAL); 444 445 final switch(lang) 446 { 447 case dz.LANG.EN: 448 show_dialback(10, 3); 449 450 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 451 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 452 glTranslatef(-9.0, 2.0, 0.0); 453 glColor4f(1.0, 1.0, 1.0, 1.0); 454 print_text("You burned in lava"); 455 456 glTranslatef(0.0, -3.0, 0.0); 457 glColor4f(1.0, 0.0, 0.0, 1.0); 458 print_text(" You lose a life"); 459 break; 460 461 case dz.LANG.RU: 462 show_dialback(10, 3); 463 464 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 465 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 466 glTranslatef(-9.0, 2.0, 0.0); 467 glColor4f(1.0, 1.0, 1.0, 1.0); 468 print_text("Вы сгорели в лаве"); 469 470 glTranslatef(0.0, -3.0, 0.0); 471 glColor4f(1.0, 0.0, 0.0, 1.0); 472 print_text("Вы теряете жизнь"); 473 } 474 475 glDisable(GL_COLOR_MATERIAL); 476 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 477 break; 478 479 case STATE.DAMAGED_BY_PIN: 480 glEnable(GL_COLOR_MATERIAL); 481 482 final switch(lang) 483 { 484 case dz.LANG.EN: 485 show_dialback(10, 3); 486 487 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 488 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 489 glTranslatef(-9.0, 2.0, 0.0); 490 glColor4f(1.0, 1.0, 1.0, 1.0); 491 print_text("Your suit damaged\n"~ 492 " by pin"); 493 494 glTranslatef(0.0, -3.0, 0.0); 495 glColor4f(1.0, 0.0, 0.0, 1.0); 496 print_text(" You lose a life"); 497 break; 498 499 case dz.LANG.RU: 500 show_dialback(12, 3); 501 502 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 503 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 504 glTranslatef(-11.0, 2.0, 0.0); 505 glColor4f(1.0, 1.0, 1.0, 1.0); 506 print_text("Ваш скафандр повреждён\n"~ 507 " кнопкой"); 508 509 glTranslatef(0.0, -3.0, 0.0); 510 glColor4f(1.0, 0.0, 0.0, 1.0); 511 print_text(" Вы теряете жизнь"); 512 } 513 514 glDisable(GL_COLOR_MATERIAL); 515 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 516 break; 517 518 case STATE.HIT_BY_ROCK: 519 glEnable(GL_COLOR_MATERIAL); 520 521 final switch(lang) 522 { 523 case dz.LANG.EN: 524 show_dialback(9, 3); 525 526 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 527 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 528 glTranslatef(-8.0, 2.0, 0.0); 529 glColor4f(1.0, 1.0, 1.0, 1.0); 530 print_text(" You were hit\n"~ 531 " by rock"); 532 533 glTranslatef(0.0, -3.0, 0.0); 534 glColor4f(1.0, 0.0, 0.0, 1.0); 535 print_text("You lose a life"); 536 break; 537 538 case dz.LANG.RU: 539 show_dialback(9, 3); 540 541 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 542 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 543 glTranslatef(-8.0, 2.0, 0.0); 544 glColor4f(1.0, 1.0, 1.0, 1.0); 545 print_text(" Вас прибило\n"~ 546 " скалой"); 547 548 glTranslatef(0.0, -3.0, 0.0); 549 glColor4f(1.0, 0.0, 0.0, 1.0); 550 print_text("Вы теряете жизнь"); 551 } 552 553 glDisable(GL_COLOR_MATERIAL); 554 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 555 break; 556 557 case STATE.BURNED_IN_FLAME: 558 glEnable(GL_COLOR_MATERIAL); 559 560 final switch(lang) 561 { 562 case dz.LANG.EN: 563 show_dialback(11, 3); 564 565 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 566 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 567 glTranslatef(-10.0, 2.0, 0.0); 568 glColor4f(1.0, 1.0, 1.0, 1.0); 569 print_text("You burned in flame"); 570 571 glTranslatef(0.0, -3.0, 0.0); 572 glColor4f(1.0, 0.0, 0.0, 1.0); 573 print_text(" You lose a life"); 574 break; 575 576 case dz.LANG.RU: 577 show_dialback(11, 3); 578 579 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 580 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 581 glTranslatef(-10.0, 2.0, 0.0); 582 glColor4f(1.0, 1.0, 1.0, 1.0); 583 print_text("Вы сгорели в пламени"); 584 585 glTranslatef(0.0, -3.0, 0.0); 586 glColor4f(1.0, 0.0, 0.0, 1.0); 587 print_text(" Вы теряете жизнь"); 588 } 589 590 glDisable(GL_COLOR_MATERIAL); 591 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 592 break; 593 594 case STATE.CRUSHED_BY_PRESSURE: 595 glEnable(GL_COLOR_MATERIAL); 596 597 final switch(lang) 598 { 599 case dz.LANG.EN: 600 show_dialback(13, 3); 601 602 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 603 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 604 glTranslatef(-12.0, 2.0, 0.0); 605 glColor4f(1.0, 1.0, 1.0, 1.0); 606 print_text("You crushed by pressure"); 607 608 glTranslatef(0.0, -3.0, 0.0); 609 glColor4f(1.0, 0.0, 0.0, 1.0); 610 print_text(" You lose a life"); 611 break; 612 613 case dz.LANG.RU: 614 show_dialback(13, 3); 615 616 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 617 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 618 glTranslatef(-12.0, 2.0, 0.0); 619 glColor4f(1.0, 1.0, 1.0, 1.0); 620 print_text("Вас раздавило давлением"); 621 622 glTranslatef(0.0, -3.0, 0.0); 623 glColor4f(1.0, 0.0, 0.0, 1.0); 624 print_text(" Вы теряете жизнь"); 625 } 626 627 glDisable(GL_COLOR_MATERIAL); 628 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 629 break; 630 631 632 case STATE.MARTIAN_AGRONOMIST_HELLO: 633 glEnable(GL_COLOR_MATERIAL); 634 635 final switch(lang) 636 { 637 case dz.LANG.EN: 638 show_dialback(21, 2, 2, 1, DIALOG_COLOR.RED); 639 640 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 641 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 642 glTranslatef(-20.0, 1.0, 0.0); 643 glColor4f(1.0, 1.0, 1.0, 1.0); 644 // 0 5 10 15 20 25 30 645 print_text("Hi from Earth. I'm..."); 646 break; 647 648 case dz.LANG.RU: 649 show_dialback(21, 2, 1, 1, DIALOG_COLOR.RED); 650 651 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 652 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 653 glTranslatef(-20.0, 1.0, 0.0); 654 glColor4f(1.0, 1.0, 1.0, 1.0); 655 // 0 5 10 15 20 25 30 656 print_text("Привет с Земли! Я...\n"); 657 } 658 659 glDisable(GL_COLOR_MATERIAL); 660 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 661 break; 662 663 case STATE.MARTIAN_AGRONOMIST_HELLO1: 664 glEnable(GL_COLOR_MATERIAL); 665 666 final switch(lang) 667 { 668 case dz.LANG.EN: 669 show_dialback(3, 2, 21, 2, DIALOG_COLOR.GREEN); 670 671 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 672 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 673 glTranslatef(-2.0, 1.0, 0.0); 674 glColor4f(1.0, 1.0, 1.0, 1.0); 675 // 0 5 10 15 20 25 30 676 print_text("Hi, Dizzy. I have seen\n"~ 677 " your rocket"); 678 break; 679 680 case dz.LANG.RU: 681 show_dialback(7, 2, 21, 2, DIALOG_COLOR.GREEN); 682 683 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 684 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 685 glTranslatef(-6.0, 1.0, 0.0); 686 glColor4f(1.0, 1.0, 1.0, 1.0); 687 // 0 5 10 15 20 25 30 688 print_text("Привет, Диззи! Да, я видел\n"~ 689 " твою ракету."); 690 } 691 692 glDisable(GL_COLOR_MATERIAL); 693 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 694 break; 695 696 case STATE.MARTIAN_AGRONOMIST_HELLO2: 697 glEnable(GL_COLOR_MATERIAL); 698 699 final switch(lang) 700 { 701 case dz.LANG.EN: 702 show_dialback(21, 2, 9, 1, DIALOG_COLOR.RED); 703 704 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 705 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 706 glTranslatef(-20.0, 1.0, 0.0); 707 glColor4f(1.0, 1.0, 1.0, 1.0); 708 // 0 5 10 15 20 25 30 709 print_text("Where from you know my name?"); 710 break; 711 712 case dz.LANG.RU: 713 show_dialback(21, 2, 6, 1, DIALOG_COLOR.RED); 714 715 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 716 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 717 glTranslatef(-20.0, 1.0, 0.0); 718 glColor4f(1.0, 1.0, 1.0, 1.0); 719 // 0 5 10 15 20 25 30 720 print_text("Откуда ты знаешь моё имя?\n"); 721 } 722 723 glDisable(GL_COLOR_MATERIAL); 724 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 725 break; 726 727 case STATE.MARTIAN_AGRONOMIST_HELLO3: 728 glEnable(GL_COLOR_MATERIAL); 729 730 final switch(lang) 731 { 732 case dz.LANG.EN: 733 show_dialback(12, 1, 21, 6, DIALOG_COLOR.GREEN); 734 735 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 736 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 737 glTranslatef(-11.0, 0.0, 0.0); 738 glColor4f(1.0, 1.0, 1.0, 1.0); 739 // 0 5 10 15 20 25 30 740 print_text("You are not the first earthman.\n"~ 741 " Before you here was added\n"~ 742 " the evil wizard Zaks.\n"~ 743 "He captured the planet, makes\n"~ 744 " us work for himself"); 745 break; 746 747 case dz.LANG.RU: 748 show_dialback(11, 1, 21, 6, DIALOG_COLOR.GREEN); 749 750 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 751 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 752 glTranslatef(-10.0, 0.0, 0.0); 753 glColor4f(1.0, 1.0, 1.0, 1.0); 754 // 0 5 10 15 20 25 30 755 print_text("Ты не первый землянин на нашей\n"~ 756 "планете. До тебя сюда добрался\n"~ 757 " злой волшебник Закс.\n"~ 758 "Он захватил планету, застав-\n"~ 759 " ляет работать на себя."); 760 } 761 762 glDisable(GL_COLOR_MATERIAL); 763 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 764 break; 765 766 case STATE.MARTIAN_AGRONOMIST_HELLO4: 767 glEnable(GL_COLOR_MATERIAL); 768 769 final switch(lang) 770 { 771 case dz.LANG.EN: 772 show_dialback(13, 1, 21, 7, DIALOG_COLOR.GREEN); 773 774 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 775 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 776 glTranslatef(-12.0, 0.0, 0.0); 777 glColor4f(1.0, 1.0, 1.0, 1.0); 778 // 0 5 10 15 20 25 30 779 print_text("The population of the planet\n"~ 780 "is falling sharply. My dog now\n"~ 781 "is guarding the secret labora-\n"~ 782 " tory, and my garden is not\n"~ 783 "protected. The poison completely\n"~ 784 "ceased to act on the wreckers."); 785 break; 786 787 case dz.LANG.RU: 788 show_dialback(9, 1, 21, 8, DIALOG_COLOR.GREEN); 789 790 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 791 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 792 glTranslatef(-8.0, 0.0, 0.0); 793 glColor4f(1.0, 1.0, 1.0, 1.0); 794 // 0 5 10 15 20 25 30 795 print_text("Население планеты резко\n"~ 796 "падает. Моя собака теперь\n"~ 797 "охраняет секретную лабора-\n"~ 798 "торию, а мой огород не\n"~ 799 "охраняется. На вредителей\n"~ 800 "совсем перестала действовать\n"~ 801 "отрава."); 802 } 803 804 glDisable(GL_COLOR_MATERIAL); 805 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 806 break; 807 808 case STATE.MARTIAN_AGRONOMIST_HELLO5: 809 glEnable(GL_COLOR_MATERIAL); 810 811 final switch(lang) 812 { 813 case dz.LANG.EN: 814 show_dialback(21, 7, 13, 1, DIALOG_COLOR.RED); 815 816 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 817 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 818 glTranslatef(-20.0, 6.0, 0.0); 819 glColor4f(1.0, 1.0, 1.0, 1.0); 820 // 0 5 10 15 20 25 30 821 print_text("Wow. On our planet he was not\n"~ 822 "so rampant. I will rid your\n"~ 823 "planet of Zaks, It is not the\n"~ 824 "first time for me. But I need\n"~ 825 "in your help. Any adaptions will\n"~ 826 "useful."); 827 break; 828 829 case dz.LANG.RU: 830 show_dialback(21, 8, 10, 1, DIALOG_COLOR.RED); 831 832 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 833 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 834 glTranslatef(-20.0, 7.0, 0.0); 835 glColor4f(1.0, 1.0, 1.0, 1.0); 836 // 0 5 10 15 20 25 30 837 print_text("Надо же. На нашей планете он\n"~ 838 " так не свирепствовал.\n"~ 839 " Я избавлю вашу планету от\n"~ 840 "Закса, мне не впервой. Но мне\n"~ 841 " нужна ваша помощь. Мне\n"~ 842 " пригодятся любые\n"~ 843 " приспособления."); 844 } 845 846 glDisable(GL_COLOR_MATERIAL); 847 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 848 break; 849 850 case STATE.MARTIAN_AGRONOMIST_HELLO6: 851 glEnable(GL_COLOR_MATERIAL); 852 853 final switch(lang) 854 { 855 case dz.LANG.EN: 856 show_dialback(10, 1, 21, 5, DIALOG_COLOR.GREEN); 857 858 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 859 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 860 glTranslatef(-9.0, 0.0, 0.0); 861 glColor4f(1.0, 1.0, 1.0, 1.0); 862 // 0 5 10 15 20 25 30 863 print_text("In the bam you can take the\n"~ 864 "fish-rod and bag. In which \n"~ 865 "you will find insecticide.\n"~ 866 "But it don't act more.\n"); 867 break; 868 869 case dz.LANG.RU: 870 show_dialback(10, 1, 21, 5, DIALOG_COLOR.GREEN); 871 872 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 873 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 874 glTranslatef(-9.0, 0.0, 0.0); 875 glColor4f(1.0, 1.0, 1.0, 1.0); 876 // 0 5 10 15 20 25 30 877 print_text(" В сарае, ты можешь взять\n"~ 878 " удочку и сумку. В ней ты\n"~ 879 "найдёшь отраву от насекомых.\n"~ 880 "Но она же уже не действует."); 881 } 882 883 glDisable(GL_COLOR_MATERIAL); 884 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 885 break; 886 887 case STATE.LOOKING_BOOTH_MESSAGE: 888 glEnable(GL_COLOR_MATERIAL); 889 890 final switch(lang) 891 { 892 case dz.LANG.EN: 893 show_dialback(9, 2); 894 895 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 896 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 897 glTranslatef(-8.0, 1.0, 0.0); 898 glColor4f(1.0, 1.0, 1.0, 1.0); 899 // 0 5 10 15 20 25 30 900 print_text("You are looking\n"~ 901 " to the booth"); 902 break; 903 904 case dz.LANG.RU: 905 show_dialback(9, 2); 906 907 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 908 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 909 glTranslatef(-8.0, 1.0, 0.0); 910 glColor4f(1.0, 1.0, 1.0, 1.0); 911 // 0 5 10 15 20 25 30 912 print_text("Вы заглядываете\n"~ 913 " в будку"); 914 } 915 916 glDisable(GL_COLOR_MATERIAL); 917 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 918 break; 919 case STATE.LOOKING_BOOTH: 920 break; 921 case STATE.DIZZY_USED_KNIFE_MESSAGE: 922 glEnable(GL_COLOR_MATERIAL); 923 924 final switch(lang) 925 { 926 case dz.LANG.EN: 927 show_dialback(9, 2); 928 929 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 930 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 931 glTranslatef(-8.0, 1.0, 0.0); 932 glColor4f(1.0, 1.0, 1.0, 1.0); 933 // 0 5 10 15 20 25 30 934 print_text("Dizzy used knife\n"~ 935 " and..."); 936 break; 937 938 case dz.LANG.RU: 939 show_dialback(11, 2); 940 941 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 942 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 943 glTranslatef(-10.0, 1.0, 0.0); 944 glColor4f(1.0, 1.0, 1.0, 1.0); 945 // 0 5 10 15 20 25 30 946 print_text("Диззи воспользовался\n"~ 947 " ножом, и..."); 948 } 949 950 glDisable(GL_COLOR_MATERIAL); 951 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 952 break; 953 case STATE.DIZZY_USED_KNIFE_ANIM: 954 case STATE.THINGS_SWEEP_AWAY_ZAKS_ANIM: 955 break; 956 957 case STATE.DIZZY_THROW_BRANCH_MESSAGE: 958 glEnable(GL_COLOR_MATERIAL); 959 960 final switch(lang) 961 { 962 case dz.LANG.EN: 963 show_dialback(12, 2, 12, 1); 964 965 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 966 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 967 glTranslatef(-11.0, 1.0, 0.0); 968 glColor4f(1.0, 1.0, 1.0, 1.0); 969 // 0 5 10 15 20 25 30 970 print_text("Dizzy throw the branch"); 971 break; 972 973 case dz.LANG.RU: 974 show_dialback(10, 2, 10, 1); 975 976 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 977 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 978 glTranslatef(-9.0, 1.0, 0.0); 979 glColor4f(1.0, 1.0, 1.0, 1.0); 980 // 0 5 10 15 20 25 30 981 print_text("Диззи бросил ветку"); 982 } 983 984 glDisable(GL_COLOR_MATERIAL); 985 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 986 break; 987 case STATE.DIZZY_THROW_BRANCH_ANIM: 988 break; 989 990 case STATE.DIZZY_CUTS_ROPE_MESSAGE: 991 glEnable(GL_COLOR_MATERIAL); 992 993 final switch(lang) 994 { 995 case dz.LANG.EN: 996 show_dialback(11, 2); 997 998 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 999 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1000 glTranslatef(-10.0, 1.0, 0.0); 1001 glColor4f(1.0, 1.0, 1.0, 1.0); 1002 // 0 5 10 15 20 25 30 1003 print_text("Dizzy cuts the rope"); 1004 break; 1005 1006 case dz.LANG.RU: 1007 show_dialback(13, 2); 1008 1009 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1010 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1011 glTranslatef(-12.0, 1.0, 0.0); 1012 glColor4f(1.0, 1.0, 1.0, 1.0); 1013 // 0 5 10 15 20 25 30 1014 print_text("Диззи перерезал верёвку"); 1015 } 1016 1017 glDisable(GL_COLOR_MATERIAL); 1018 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1019 break; 1020 case STATE.DIZZY_CUTS_ROPE_ANIM: 1021 break; 1022 1023 case STATE.MARTIAN_ENGINEER_GET_AWAY: 1024 glEnable(GL_COLOR_MATERIAL); 1025 1026 final switch(lang) 1027 { 1028 case dz.LANG.EN: 1029 show_dialback(1, 2, 20, 2, DIALOG_COLOR.GREEN); 1030 1031 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1032 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1033 glTranslatef(-0.0, 1.0, 0.0); 1034 glColor4f(1.0, 1.0, 1.0, 1.0); 1035 // 0 5 10 15 20 25 30 1036 print_text("Get away from here,\n"~ 1037 " uninvited"); 1038 break; 1039 1040 case dz.LANG.RU: 1041 show_dialback(3, 2, 21, 1, DIALOG_COLOR.GREEN); 1042 1043 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1044 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1045 glTranslatef(-2.0, 1.0, 0.0); 1046 glColor4f(1.0, 1.0, 1.0, 1.0); 1047 // 0 5 10 15 20 25 30 1048 print_text("Прочь отсюда, незванец\n"); 1049 } 1050 1051 glDisable(GL_COLOR_MATERIAL); 1052 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1053 break; 1054 1055 case STATE.MARTIAN_AGRONOMIST_ROPE: 1056 glEnable(GL_COLOR_MATERIAL); 1057 1058 final switch(lang) 1059 { 1060 case dz.LANG.EN: 1061 show_dialback(4, 3, 21, 2, DIALOG_COLOR.GREEN); 1062 1063 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1064 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1065 glTranslatef(-3.0, 2.0, 0.0); 1066 glColor4f(1.0, 1.0, 1.0, 1.0); 1067 // 0 5 10 15 20 25 30 1068 print_text("Thank you for releasing\n"~ 1069 " the dog. You can take\n"~ 1070 " this rope."); 1071 break; 1072 1073 case dz.LANG.RU: 1074 show_dialback(4, 3, 21, 2, DIALOG_COLOR.GREEN); 1075 1076 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1077 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1078 glTranslatef(-3.0, 2.0, 0.0); 1079 glColor4f(1.0, 1.0, 1.0, 1.0); 1080 // 0 5 10 15 20 25 30 1081 print_text("Спасибо за освобождение\n"~ 1082 "собаки. Ты можешь взять\n"~ 1083 " эту верёвку."); 1084 } 1085 1086 glDisable(GL_COLOR_MATERIAL); 1087 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1088 break; 1089 1090 case STATE.MARTIAN_ENGINEER_TAKES_PLAYER: 1091 glEnable(GL_COLOR_MATERIAL); 1092 1093 final switch(lang) 1094 { 1095 case dz.LANG.EN: 1096 show_dialback(7, 4, 21, 3, DIALOG_COLOR.GREEN); 1097 1098 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1099 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1100 glTranslatef(-6.0, 3.0, 0.0); 1101 glColor4f(1.0, 1.0, 1.0, 1.0); 1102 // 0 5 10 15 20 25 30 1103 print_text("Is it for me? What is it?\n"~ 1104 "Music?.. Wow, good music!\n"~ 1105 "I will take it to make for\n"~ 1106 "me the same thing. You can\n"~ 1107 "pass."); 1108 break; 1109 1110 case dz.LANG.RU: 1111 show_dialback(8, 4, 21, 3, DIALOG_COLOR.GREEN); 1112 1113 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1114 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1115 glTranslatef(-7.0, 3.0, 0.0); 1116 glColor4f(1.0, 1.0, 1.0, 1.0); 1117 // 0 5 10 15 20 25 30 1118 print_text("Это мне? Что это? Музыка?..\n"~ 1119 "Слушай, хорошая музыка, я,\n"~ 1120 "пожалуй, возьму себе это,\n"~ 1121 "спаяю себе такой же. А ты\n"~ 1122 " можешь проходить"); 1123 } 1124 1125 glDisable(GL_COLOR_MATERIAL); 1126 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1127 break; 1128 1129 case STATE.DIZZY_TIED_ROPE_MESSAGE: 1130 glEnable(GL_COLOR_MATERIAL); 1131 1132 final switch(lang) 1133 { 1134 case dz.LANG.EN: 1135 show_dialback(9, 2, 8, 1); 1136 1137 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1138 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1139 glTranslatef(-8.0, 1.0, 0.0); 1140 glColor4f(1.0, 1.0, 1.0, 1.0); 1141 // 0 5 10 15 20 25 30 1142 print_text("Dizzy tied rope"); 1143 break; 1144 1145 case dz.LANG.RU: 1146 show_dialback(12, 2, 12, 1); 1147 1148 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1149 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1150 glTranslatef(-11.0, 1.0, 0.0); 1151 glColor4f(1.0, 1.0, 1.0, 1.0); 1152 // 0 5 10 15 20 25 30 1153 print_text("Диззи привязал верёвку"); 1154 } 1155 1156 glDisable(GL_COLOR_MATERIAL); 1157 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1158 break; 1159 1160 case STATE.DIZZY_UNTIED_ROPE_MESSAGE: 1161 case STATE.DIZZY_UNTIED_SHORT_ROPE_MESSAGE: 1162 glEnable(GL_COLOR_MATERIAL); 1163 1164 final switch(lang) 1165 { 1166 case dz.LANG.EN: 1167 show_dialback(10, 2, 9, 1); 1168 1169 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1170 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1171 glTranslatef(-9.0, 1.0, 0.0); 1172 glColor4f(1.0, 1.0, 1.0, 1.0); 1173 // 0 5 10 15 20 25 30 1174 print_text("Dizzy untied rope"); 1175 break; 1176 1177 case dz.LANG.RU: 1178 show_dialback(12, 2, 12, 1); 1179 1180 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1181 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1182 glTranslatef(-11.0, 1.0, 0.0); 1183 glColor4f(1.0, 1.0, 1.0, 1.0); 1184 // 0 5 10 15 20 25 30 1185 print_text("Диззи отвязал верёвку"); 1186 } 1187 1188 glDisable(GL_COLOR_MATERIAL); 1189 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1190 break; 1191 1192 case STATE.DIZZY_CATCH_GRASSHOPPER_MESSAGE: 1193 glEnable(GL_COLOR_MATERIAL); 1194 1195 final switch(lang) 1196 { 1197 case dz.LANG.EN: 1198 show_dialback(18, 3, 17, 2); 1199 1200 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1201 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1202 glTranslatef(-17.0, 2.0, 0.0); 1203 glColor4f(1.0, 1.0, 1.0, 1.0); 1204 // 0 5 10 15 20 25 30 1205 print_text("Having driven a grasshopper into\n"~ 1206 "a pit, Dizzy was able to catch it\n"~ 1207 " with his bare hands."); 1208 break; 1209 1210 case dz.LANG.RU: 1211 show_dialback(13, 3, 12, 2); 1212 1213 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1214 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1215 glTranslatef(-12.0, 2.0, 0.0); 1216 glColor4f(1.0, 1.0, 1.0, 1.0); 1217 // 0 5 10 15 20 25 30 1218 print_text("Загнав кузнечика в яму,\n"~ 1219 "Диззи смог поймать его\n" ~ 1220 " голыми руками"); 1221 } 1222 1223 glDisable(GL_COLOR_MATERIAL); 1224 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1225 break; 1226 1227 1228 case STATE.MARTIAN_CHEMIST_HELLO: 1229 glEnable(GL_COLOR_MATERIAL); 1230 1231 final switch(lang) 1232 { 1233 case dz.LANG.EN: 1234 show_dialback(21, 2, 7, 2, DIALOG_COLOR.RED); 1235 1236 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1237 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1238 glTranslatef(-20.0, 1.0, 0.0); 1239 glColor4f(1.0, 1.0, 1.0, 1.0); 1240 // 0 5 10 15 20 25 30 1241 print_text("Hello! What you know about\n"~ 1242 " the wizard?"); 1243 break; 1244 1245 case dz.LANG.RU: 1246 show_dialback(21, 2, 10, 2, DIALOG_COLOR.RED); 1247 1248 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1249 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1250 glTranslatef(-20.0, 1.0, 0.0); 1251 glColor4f(1.0, 1.0, 1.0, 1.0); 1252 // 0 5 10 15 20 25 30 1253 print_text("Здравcтвуйте! А что вы знаете\n"~ 1254 " о волшебнике?"); 1255 } 1256 1257 glDisable(GL_COLOR_MATERIAL); 1258 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1259 break; 1260 1261 case STATE.MARTIAN_CHEMIST_HELLO1: 1262 glEnable(GL_COLOR_MATERIAL); 1263 1264 final switch(lang) 1265 { 1266 case dz.LANG.EN: 1267 show_dialback(11, 5, 21, 4, DIALOG_COLOR.GREEN); 1268 1269 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1270 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1271 glTranslatef(-10.0, 4.0, 0.0); 1272 glColor4f(1.0, 1.0, 1.0, 1.0); 1273 // 0 5 10 15 20 25 30 1274 print_text("Hi, Dizzy! Zaks ordered me to\n"~ 1275 " maintain in the castle\n"~ 1276 " the atmosphere of a special\n"~ 1277 " composition. These conditions\n"~ 1278 "was initially as on Earth, but\n"~ 1279 "with each day it more and more\n"~ 1280 " distant from it.\n"); 1281 break; 1282 1283 case dz.LANG.RU: 1284 show_dialback(12, 4, 21, 4, DIALOG_COLOR.GREEN); 1285 1286 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1287 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1288 glTranslatef(-11.0, 3.0, 0.0); 1289 glColor4f(1.0, 1.0, 1.0, 1.0); 1290 // 0 5 10 15 20 25 30 1291 print_text(" Привет, Диззи! Закс наказал\n"~ 1292 " мне поддерживать в замке\n"~ 1293 "атмосферу специального состава.\n"~ 1294 " Эти условия изначально земные\n"~ 1295 " с каждым днём всё более\n"~ 1296 " отдаляются от них."); 1297 } 1298 1299 glDisable(GL_COLOR_MATERIAL); 1300 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1301 break; 1302 1303 case STATE.MARTIAN_CHEMIST_HELLO2: 1304 glEnable(GL_COLOR_MATERIAL); 1305 1306 final switch(lang) 1307 { 1308 case dz.LANG.EN: 1309 show_dialback(21, 2, 8, 2, DIALOG_COLOR.RED); 1310 1311 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1312 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1313 glTranslatef(-20.0, 1.0, 0.0); 1314 glColor4f(1.0, 1.0, 1.0, 1.0); 1315 // 0 5 10 15 20 25 30 1316 print_text("Oh. my God! I hope they are\n"~ 1317 " not held in shackles!"); 1318 break; 1319 1320 case dz.LANG.RU: 1321 show_dialback(21, 2, 6, 2, DIALOG_COLOR.RED); 1322 1323 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1324 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1325 glTranslatef(-20.0, 1.0, 0.0); 1326 glColor4f(1.0, 1.0, 1.0, 1.0); 1327 // 0 5 10 15 20 25 30 1328 print_text(" Боже! Надеюсь они там\n"~ 1329 "не содержатся в кандалах!"); 1330 } 1331 1332 glDisable(GL_COLOR_MATERIAL); 1333 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1334 break; 1335 1336 case STATE.MARTIAN_CHEMIST_HELLO3: 1337 glEnable(GL_COLOR_MATERIAL); 1338 1339 final switch(lang) 1340 { 1341 case dz.LANG.EN: 1342 show_dialback(12, 6, 21, 5, DIALOG_COLOR.GREEN); 1343 1344 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1345 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1346 glTranslatef(-11.0, 5.0, 0.0); 1347 glColor4f(1.0, 1.0, 1.0, 1.0); 1348 // 0 5 10 15 20 25 30 1349 print_text("No, of course. There they have\n"~ 1350 "a very good time. But unfortu-\n"~ 1351 "nately, only an engineer knows\n"~ 1352 " how to get into the castle.\n"~ 1353 " He designed it. Wait, when he\n"~ 1354 " will free. In addition,\n"~ 1355 " surely the entrance to the\n"~ 1356 "castle is guarded by the wizard\n"~ 1357 " himself."); 1358 break; 1359 1360 case dz.LANG.RU: 1361 show_dialback(11, 5, 21, 5, DIALOG_COLOR.GREEN); 1362 1363 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1364 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1365 glTranslatef(-10.0, 4.0, 0.0); 1366 glColor4f(1.0, 1.0, 1.0, 1.0); 1367 // 0 5 10 15 20 25 30 1368 print_text("Нет, что ты? Там они весьма\n"~ 1369 " неплохо проводят время. Но\n"~ 1370 " к сожалению как попасть в\n"~ 1371 " замок знает только инженер,\n"~ 1372 " он его проектировал. Жди,\n"~ 1373 " когда он освободиться.\n"~ 1374 " К тому же вход в замок\n"~ 1375 "наверняка охраняет сам колдун."); 1376 } 1377 1378 glDisable(GL_COLOR_MATERIAL); 1379 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1380 break; 1381 1382 case STATE.MARTIAN_CHEMIST_HELLO4: 1383 glEnable(GL_COLOR_MATERIAL); 1384 1385 final switch(lang) 1386 { 1387 case dz.LANG.EN: 1388 show_dialback(16, 2, 1, 1, DIALOG_COLOR.RED); 1389 1390 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1391 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1392 glTranslatef(-15.0, 1.0, 0.0); 1393 glColor4f(1.0, 1.0, 1.0, 1.0); 1394 // 0 5 10 15 20 25 30 1395 print_text("So, what to do?"); 1396 break; 1397 1398 case dz.LANG.RU: 1399 show_dialback(15, 2, 1, 1, DIALOG_COLOR.RED); 1400 1401 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1402 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1403 glTranslatef(-14.0, 1.0, 0.0); 1404 glColor4f(1.0, 1.0, 1.0, 1.0); 1405 // 0 5 10 15 20 25 30 1406 print_text("Что же делать?"); 1407 } 1408 1409 glDisable(GL_COLOR_MATERIAL); 1410 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1411 break; 1412 1413 case STATE.MARTIAN_CHEMIST_HELLO5: 1414 glEnable(GL_COLOR_MATERIAL); 1415 1416 final switch(lang) 1417 { 1418 case dz.LANG.EN: 1419 show_dialback(12, 5, 21, 5, DIALOG_COLOR.GREEN); 1420 1421 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1422 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1423 glTranslatef(-11.0, 4.0, 0.0); 1424 glColor4f(1.0, 1.0, 1.0, 1.0); 1425 // 0 5 10 15 20 25 30 1426 print_text("I have the idea. I need poison\n"~ 1427 " for grasshoppers and bugs.\n"~ 1428 "And live representatives of the\n"~ 1429 "food chain starting with grass-\n"~ 1430 " hoppers and bugs. And take it\n"~ 1431 " easy, I see you are nervous.\n"~ 1432 "Here's a drink for you to calm\n"~ 1433 " down."); 1434 break; 1435 1436 case dz.LANG.RU: 1437 show_dialback(14, 5, 21, 4, DIALOG_COLOR.GREEN); 1438 1439 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1440 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1441 glTranslatef(-13.0, 4.0, 0.0); 1442 glColor4f(1.0, 1.0, 1.0, 1.0); 1443 // 0 5 10 15 20 25 30 1444 print_text(" Есть одна идея. Мне нужна\n"~ 1445 " отрава от кузнечиков и жуков.\n"~ 1446 " И живые представители пищевой\n"~ 1447 " цепочки начинающейся с\n"~ 1448 " кузнечиков и жуков. А так\n"~ 1449 "успокойся, я вижу ты нервничаешь.\n"~ 1450 " Вот тебе напиток для успокоения."); 1451 } 1452 1453 glDisable(GL_COLOR_MATERIAL); 1454 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1455 break; 1456 1457 case STATE.DIZZY_DRINK_STUNNING_MESSAGE: 1458 glEnable(GL_COLOR_MATERIAL); 1459 1460 final switch(lang) 1461 { 1462 case dz.LANG.EN: 1463 show_dialback(14, 2, 14, 1); 1464 1465 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1466 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1467 glTranslatef(-13.0, 1.0, 0.0); 1468 glColor4f(1.0, 1.0, 1.0, 1.0); 1469 // 0 5 10 15 20 25 30 1470 print_text("Dizzy drunk stunning drink"); 1471 break; 1472 1473 case dz.LANG.RU: 1474 show_dialback(18, 2, 17, 1); 1475 1476 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1477 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1478 glTranslatef(-17.0, 1.0, 0.0); 1479 glColor4f(1.0, 1.0, 1.0, 1.0); 1480 // 0 5 10 15 20 25 30 1481 print_text("Диззи выпил сногсшибающий напиток"); 1482 } 1483 1484 glDisable(GL_COLOR_MATERIAL); 1485 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1486 break; 1487 1488 case STATE.MARTIAN_AGRONOMIST_GIVES_BUCKET: 1489 glEnable(GL_COLOR_MATERIAL); 1490 1491 final switch(lang) 1492 { 1493 case dz.LANG.EN: 1494 show_dialback(16, 2, 1, 1, DIALOG_COLOR.RED); 1495 1496 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1497 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1498 glTranslatef(-15.0, 1.0, 0.0); 1499 glColor4f(1.0, 1.0, 1.0, 1.0); 1500 // 0 5 10 15 20 25 30 1501 print_text("Can I help you?"); 1502 break; 1503 1504 case dz.LANG.RU: 1505 show_dialback(19, 2, 1, 2, DIALOG_COLOR.RED); 1506 1507 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1508 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1509 glTranslatef(-18.0, 1.0, 0.0); 1510 glColor4f(1.0, 1.0, 1.0, 1.0); 1511 // 0 5 10 15 20 25 30 1512 print_text(" Не надо ли вам\n"~ 1513 "чем-нибудь помочь?"); 1514 } 1515 1516 glDisable(GL_COLOR_MATERIAL); 1517 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1518 break; 1519 1520 case STATE.MARTIAN_AGRONOMIST_GIVES_BUCKET1: 1521 glEnable(GL_COLOR_MATERIAL); 1522 1523 final switch(lang) 1524 { 1525 case dz.LANG.EN: 1526 show_dialback(10, 2, 21, 2, DIALOG_COLOR.GREEN); 1527 1528 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1529 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1530 glTranslatef(-9.0, 1.0, 0.0); 1531 glColor4f(1.0, 1.0, 1.0, 1.0); 1532 // 0 5 10 15 20 25 30 1533 print_text("Yes, water please my flowers.\n"~ 1534 " Here's a bucket"); 1535 break; 1536 1537 case dz.LANG.RU: 1538 show_dialback(13, 2, 21, 2, DIALOG_COLOR.GREEN); 1539 1540 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1541 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1542 glTranslatef(-12.0, 1.0, 0.0); 1543 glColor4f(1.0, 1.0, 1.0, 1.0); 1544 // 0 5 10 15 20 25 30 1545 print_text("Да полей, пожалуйста, мои цветы.\n"~ 1546 " Вот ведро."); 1547 } 1548 1549 glDisable(GL_COLOR_MATERIAL); 1550 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1551 break; 1552 1553 case STATE.DIZZY_TRIES_FILL_BUCKET_MESSAGE: 1554 glEnable(GL_COLOR_MATERIAL); 1555 1556 final switch(lang) 1557 { 1558 case dz.LANG.EN: 1559 show_dialback(15, 3, 14, 3); 1560 1561 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1562 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1563 glTranslatef(-14.0, 2.0, 0.0); 1564 glColor4f(1.0, 1.0, 1.0, 1.0); 1565 // 0 5 10 15 20 25 30 1566 print_text("With the rope Dizzy dropped\n"~ 1567 " the bucket into the well,\n"~ 1568 "but something prevented it\n"~ 1569 " from reaching the water."); 1570 break; 1571 1572 case dz.LANG.RU: 1573 show_dialback(15, 3, 14, 3); 1574 1575 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1576 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1577 glTranslatef(-14.0, 2.0, 0.0); 1578 glColor4f(1.0, 1.0, 1.0, 1.0); 1579 // 0 5 10 15 20 25 30 1580 print_text(" При помощи верёвки Диззи\n"~ 1581 " спустил ведро в колодец,\n"~ 1582 "но что-то мешало достигнуть\n"~ 1583 " воды"); 1584 } 1585 1586 glDisable(GL_COLOR_MATERIAL); 1587 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1588 break; 1589 1590 case STATE.DIZZY_THROW_METEORITE_MESSAGE: 1591 glEnable(GL_COLOR_MATERIAL); 1592 1593 final switch(lang) 1594 { 1595 case dz.LANG.EN: 1596 show_dialback(16, 3, 16, 2); 1597 1598 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1599 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1600 glTranslatef(-15.0, 2.0, 0.0); 1601 glColor4f(1.0, 1.0, 1.0, 1.0); 1602 // 0 5 10 15 20 25 30 1603 print_text("Dizzy threw the meteorite into\n"~ 1604 " the well. There was a splash\n"~ 1605 " of water."); 1606 break; 1607 1608 case dz.LANG.RU: 1609 show_dialback(17, 2, 17, 2); 1610 1611 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1612 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1613 glTranslatef(-16.0, 1.0, 0.0); 1614 glColor4f(1.0, 1.0, 1.0, 1.0); 1615 // 0 5 10 15 20 25 30 1616 print_text("Диззи бросил метеорит в колодец.\n"~ 1617 " Раздался всплеск воды."); 1618 } 1619 1620 glDisable(GL_COLOR_MATERIAL); 1621 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1622 break; 1623 1624 case STATE.DIZZY_FILL_BUCKET_MESSAGE: 1625 glEnable(GL_COLOR_MATERIAL); 1626 1627 final switch(lang) 1628 { 1629 case dz.LANG.EN: 1630 show_dialback(16, 3, 15, 2); 1631 1632 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1633 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1634 glTranslatef(-15.0, 2.0, 0.0); 1635 glColor4f(1.0, 1.0, 1.0, 1.0); 1636 // 0 5 10 15 20 25 30 1637 print_text(" With the rope Dizzy dropped\n"~ 1638 " the bucket into the well,\n"~ 1639 " and filled it with water."); 1640 break; 1641 1642 case dz.LANG.RU: 1643 show_dialback(14, 3, 13, 2); 1644 1645 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1646 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1647 glTranslatef(-13.0, 2.0, 0.0); 1648 glColor4f(1.0, 1.0, 1.0, 1.0); 1649 // 0 5 10 15 20 25 30 1650 print_text(" При помощи верёвки Диззи\n"~ 1651 "спустил ведро в колодец и\n"~ 1652 " наполнил его водой."); 1653 } 1654 1655 glDisable(GL_COLOR_MATERIAL); 1656 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1657 break; 1658 1659 case STATE.DIZZY_TRIES_WATER_FLOWERS_MESSAGE: 1660 glEnable(GL_COLOR_MATERIAL); 1661 1662 final switch(lang) 1663 { 1664 case dz.LANG.EN: 1665 show_dialback(17, 2, 16, 2); 1666 1667 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1668 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1669 glTranslatef(-16.0, 1.0, 0.0); 1670 glColor4f(1.0, 1.0, 1.0, 1.0); 1671 // 0 5 10 15 20 25 30 1672 print_text("Dizzy tried to water flowers,\n"~ 1673 "but water in the bucket frozen."); 1674 break; 1675 1676 case dz.LANG.RU: 1677 show_dialback(16, 2, 15, 2); 1678 1679 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1680 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1681 glTranslatef(-15.0, 1.0, 0.0); 1682 glColor4f(1.0, 1.0, 1.0, 1.0); 1683 // 0 5 10 15 20 25 30 1684 print_text("Диззи попытался полить цветы,\n"~ 1685 " но вода в ведре замёрзла"); 1686 } 1687 1688 glDisable(GL_COLOR_MATERIAL); 1689 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1690 break; 1691 1692 case STATE.DIZZY_COVERED_BUCKET_MESSAGE: 1693 glEnable(GL_COLOR_MATERIAL); 1694 1695 final switch(lang) 1696 { 1697 case dz.LANG.EN: 1698 show_dialback(13, 2, 12, 2); 1699 1700 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1701 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1702 glTranslatef(-12.0, 1.0, 0.0); 1703 glColor4f(1.0, 1.0, 1.0, 1.0); 1704 // 0 5 10 15 20 25 30 1705 print_text("Dizzy covered bucket of\n"~ 1706 " water with blanket"); 1707 break; 1708 1709 case dz.LANG.RU: 1710 show_dialback(10, 2, 10, 2); 1711 1712 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1713 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1714 glTranslatef(-9.0, 1.0, 0.0); 1715 glColor4f(1.0, 1.0, 1.0, 1.0); 1716 // 0 5 10 15 20 25 30 1717 print_text("Диззи накрыл ведро\n"~ 1718 " воды одеялом"); 1719 } 1720 1721 glDisable(GL_COLOR_MATERIAL); 1722 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1723 break; 1724 1725 case STATE.DIZZY_WATER_FLOWERS_MESSAGE: 1726 glEnable(GL_COLOR_MATERIAL); 1727 1728 final switch(lang) 1729 { 1730 case dz.LANG.EN: 1731 show_dialback(14, 2, 14, 1); 1732 1733 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1734 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1735 glTranslatef(-13.0, 1.0, 0.0); 1736 glColor4f(1.0, 1.0, 1.0, 1.0); 1737 // 0 5 10 15 20 25 30 1738 print_text("Dizzy watered the flowers."); 1739 break; 1740 1741 case dz.LANG.RU: 1742 show_dialback(10, 2, 10, 1); 1743 1744 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1745 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1746 glTranslatef(-9.0, 1.0, 0.0); 1747 glColor4f(1.0, 1.0, 1.0, 1.0); 1748 // 0 5 10 15 20 25 30 1749 print_text("Диззи полил цветы."); 1750 } 1751 1752 glDisable(GL_COLOR_MATERIAL); 1753 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1754 break; 1755 1756 case STATE.MARTIAN_AGRONOMIST_THANKS: 1757 glEnable(GL_COLOR_MATERIAL); 1758 1759 final switch(lang) 1760 { 1761 case dz.LANG.EN: 1762 show_dialback(10, 4, 21, 3, DIALOG_COLOR.GREEN); 1763 1764 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1765 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1766 glTranslatef(-9.0, 3.0, 0.0); 1767 glColor4f(1.0, 1.0, 1.0, 1.0); 1768 // 0 5 10 15 20 25 30 1769 print_text(" Thank you, Dizzy! You can\n"~ 1770 "leave the bucket for yourself.\n"~ 1771 "Also I want to make new booth\n"~ 1772 "for the dog. I need materials\n"~ 1773 " and tools."); 1774 break; 1775 1776 case dz.LANG.RU: 1777 show_dialback(8, 4, 21, 3, DIALOG_COLOR.GREEN); 1778 1779 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1780 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1781 glTranslatef(-7.0, 3.0, 0.0); 1782 glColor4f(1.0, 1.0, 1.0, 1.0); 1783 // 0 5 10 15 20 25 30 1784 print_text("Спасибо, Диззи! Ты можешь\n"~ 1785 " оставить ведро себе.\n"~ 1786 "Кстати я хочу сделать новую\n"~ 1787 "будку для собаки мне нужны\n"~ 1788 " материалы и инструменты."); 1789 } 1790 1791 glDisable(GL_COLOR_MATERIAL); 1792 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1793 break; 1794 1795 case STATE.MARTIAN_ENGINEER_RETURNS_PLAYER: 1796 glEnable(GL_COLOR_MATERIAL); 1797 1798 final switch(lang) 1799 { 1800 case dz.LANG.EN: 1801 show_dialback(10, 5, 21, 5, DIALOG_COLOR.GREEN); 1802 1803 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1804 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1805 glTranslatef(-9.0, 4.0, 0.0); 1806 glColor4f(1.0, 1.0, 1.0, 1.0); 1807 // 0 5 10 15 20 25 30 1808 print_text("Again thanks for the player,\n"~ 1809 " Dizzy. In my model, I have\n"~ 1810 "increased headphones, and I'm\n"~ 1811 " returning your ones.\n"~ 1812 "By the way, one impudent bug\n"~ 1813 "has stolen my protection from\n"~ 1814 " pressure. If you find it,\n"~ 1815 " you can take it."); 1816 break; 1817 1818 case dz.LANG.RU: 1819 show_dialback(12, 4, 21, 4, DIALOG_COLOR.GREEN); 1820 1821 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1822 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1823 glTranslatef(-11.0, 3.0, 0.0); 1824 glColor4f(1.0, 1.0, 1.0, 1.0); 1825 // 0 5 10 15 20 25 30 1826 print_text("Ещё раз спасибо за плеер Диззи.\n"~ 1827 " В своей модели я увеличил\n"~ 1828 " наушники, а твой возвращаю.\n"~ 1829 "Кстати один наглый жук стащил\n"~ 1830 " мою защиту от давления, если\n"~ 1831 " найдёшь, можешь взять себе."); 1832 } 1833 1834 glDisable(GL_COLOR_MATERIAL); 1835 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1836 break; 1837 1838 case STATE.MARTIAN_ENGINEER_RETURNS_PLAYER1: 1839 glEnable(GL_COLOR_MATERIAL); 1840 1841 final switch(lang) 1842 { 1843 case dz.LANG.EN: 1844 show_dialback(21, 2, 12, 2, DIALOG_COLOR.RED); 1845 1846 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1847 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1848 glTranslatef(-20.0, 1.0, 0.0); 1849 glColor4f(1.0, 1.0, 1.0, 1.0); 1850 // 0 5 10 15 20 25 30 1851 print_text("What do you know about entrance\n"~ 1852 " to the castle?"); 1853 break; 1854 1855 case dz.LANG.RU: 1856 show_dialback(21, 2, 12, 1, DIALOG_COLOR.RED); 1857 1858 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1859 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1860 glTranslatef(-20.0, 1.0, 0.0); 1861 glColor4f(1.0, 1.0, 1.0, 1.0); 1862 // 0 5 10 15 20 25 30 1863 print_text("Что, вы знаете о входе в замок?"); 1864 } 1865 1866 glDisable(GL_COLOR_MATERIAL); 1867 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1868 break; 1869 1870 case STATE.MARTIAN_ENGINEER_RETURNS_PLAYER2: 1871 glEnable(GL_COLOR_MATERIAL); 1872 1873 final switch(lang) 1874 { 1875 case dz.LANG.EN: 1876 show_dialback(9, 3, 21, 3, DIALOG_COLOR.GREEN); 1877 1878 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1879 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1880 glTranslatef(-8.0, 2.0, 0.0); 1881 glColor4f(1.0, 1.0, 1.0, 1.0); 1882 // 0 5 10 15 20 25 30 1883 print_text("The entrance is underground.\n"~ 1884 "You need to find the secret\n"~ 1885 "pass. I can do the spade for\n"~ 1886 " you, But I need a material"); 1887 break; 1888 1889 case dz.LANG.RU: 1890 show_dialback(12, 3, 21, 3, DIALOG_COLOR.GREEN); 1891 1892 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1893 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1894 glTranslatef(-11.0, 2.0, 0.0); 1895 glColor4f(1.0, 1.0, 1.0, 1.0); 1896 // 0 5 10 15 20 25 30 1897 print_text(" Вход в замок под землёй.\n"~ 1898 "Тебе необходимо найти секретный\n"~ 1899 "лаз. Я могу сделать лопату для\n"~ 1900 " тебя. Но мне нужны материалы"); 1901 } 1902 1903 glDisable(GL_COLOR_MATERIAL); 1904 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1905 break; 1906 1907 case STATE.MARTIAN_ENGINEER_TAKES_BUCKET: 1908 glEnable(GL_COLOR_MATERIAL); 1909 1910 final switch(lang) 1911 { 1912 case dz.LANG.EN: 1913 show_dialback(21, 2, 7, 1, DIALOG_COLOR.RED); 1914 1915 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1916 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1917 glTranslatef(-20.0, 1.0, 0.0); 1918 glColor4f(1.0, 1.0, 1.0, 1.0); 1919 // 0 5 10 15 20 25 30 1920 print_text("Is this material suitable?"); 1921 break; 1922 1923 case dz.LANG.RU: 1924 show_dialback(21, 2, 5, 1, DIALOG_COLOR.RED); 1925 1926 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1927 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1928 glTranslatef(-20.0, 1.0, 0.0); 1929 glColor4f(1.0, 1.0, 1.0, 1.0); 1930 // 0 5 10 15 20 25 30 1931 print_text("Такой материал подойдёт?"); 1932 } 1933 1934 glDisable(GL_COLOR_MATERIAL); 1935 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1936 break; 1937 1938 case STATE.MARTIAN_ENGINEER_TAKES_BUCKET1: 1939 glEnable(GL_COLOR_MATERIAL); 1940 1941 final switch(lang) 1942 { 1943 case dz.LANG.EN: 1944 show_dialback(15, 4, 21, 3, DIALOG_COLOR.GREEN); 1945 1946 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1947 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1948 glTranslatef(-14.0, 3.0, 0.0); 1949 glColor4f(1.0, 1.0, 1.0, 1.0); 1950 // 0 5 10 15 20 25 30 1951 print_text("What is it? Ice? Oum! It is ideally!\n"~ 1952 "I'll do it, everything will be at\n"~ 1953 "its best. And while you take care\n"~ 1954 " of the lighting, it's dark\n"~ 1955 " underground"); 1956 break; 1957 1958 case dz.LANG.RU: 1959 show_dialback(13, 3, 21, 3, DIALOG_COLOR.GREEN); 1960 1961 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1962 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1963 glTranslatef(-12.0, 2.0, 0.0); 1964 glColor4f(1.0, 1.0, 1.0, 1.0); 1965 // 0 5 10 15 20 25 30 1966 print_text(" Что это? Лёд? Оум! Идеально!\n"~ 1967 "Сделаю, всё будет в лучшем виде.\n"~ 1968 " А ты пока позаботься об\n"~ 1969 " освещении - под землёй темно."); 1970 } 1971 1972 glDisable(GL_COLOR_MATERIAL); 1973 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1974 break; 1975 1976 case STATE.MARTIAN_ENGINEER_RETURNS_BUCKET: 1977 glEnable(GL_COLOR_MATERIAL); 1978 1979 final switch(lang) 1980 { 1981 case dz.LANG.EN: 1982 show_dialback(14, 3, 21, 3, DIALOG_COLOR.GREEN); 1983 1984 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1985 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 1986 glTranslatef(-13.0, 2.0, 0.0); 1987 glColor4f(1.0, 1.0, 1.0, 1.0); 1988 // 0 5 10 15 20 25 30 1989 print_text(" Do you need a bucket? Take it,\n"~ 1990 " please. And the chemist told me\n"~ 1991 "about his idea. Come later to me,\n"~ 1992 " I will have something for you."); 1993 break; 1994 1995 case dz.LANG.RU: 1996 show_dialback(9, 4, 21, 3, DIALOG_COLOR.GREEN); 1997 1998 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 1999 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2000 glTranslatef(-8.0, 3.0, 0.0); 2001 glColor4f(1.0, 1.0, 1.0, 1.0); 2002 // 0 5 10 15 20 25 30 2003 print_text(" Тебе нужно ведро? Возьми,\n"~ 2004 " пожалуйста. И химик сказал\n"~ 2005 " мне про его задумку. Зайди\n"~ 2006 "позже ко мне. У меня кое-что\n"~ 2007 " для тебя будет."); 2008 } 2009 2010 glDisable(GL_COLOR_MATERIAL); 2011 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2012 break; 2013 2014 case STATE.DIZZY_HOLD_BRANCH_UNDER_DROP: 2015 glEnable(GL_COLOR_MATERIAL); 2016 2017 final switch(lang) 2018 { 2019 case dz.LANG.EN: 2020 show_dialback(17, 3); 2021 2022 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2023 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2024 glTranslatef(-16.0, 2.0, 0.0); 2025 glColor4f(1.0, 1.0, 1.0, 1.0); 2026 // 0 5 10 15 20 25 30 2027 print_text("One, two, three... Dizzy counted\n"~ 2028 "the drops falling on the branch.\n"~ 2029 " On count 100 branch has begun\n"~ 2030 " to shine."); 2031 break; 2032 2033 case dz.LANG.RU: 2034 show_dialback(18, 3, 17, 2); 2035 2036 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2037 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2038 glTranslatef(-17.0, 2.0, 0.0); 2039 glColor4f(1.0, 1.0, 1.0, 1.0); 2040 // 0 5 10 15 20 25 30 2041 print_text(" Раз, два, три... Диззи считал\n"~ 2042 "капли, падающие на ветку. На счёт\n"~ 2043 " 100 ветка засияла."); 2044 } 2045 2046 glDisable(GL_COLOR_MATERIAL); 2047 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2048 break; 2049 2050 case STATE.DIZZY_OPEN_DOOR: 2051 glEnable(GL_COLOR_MATERIAL); 2052 2053 final switch(lang) 2054 { 2055 case dz.LANG.EN: 2056 show_dialback(20, 3); 2057 2058 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2059 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2060 glTranslatef(-19.0, 2.0, 0.0); 2061 glColor4f(1.0, 1.0, 1.0, 1.0); 2062 // 0 5 10 15 20 25 30 2063 print_text("Despite the strange shape of the key,\n"~ 2064 " Dizzy tried to insert it into\n"~ 2065 " the keyhole. The door opened in\n"~ 2066 " an incomprehensible way."); 2067 break; 2068 2069 case dz.LANG.RU: 2070 show_dialback(18, 3, 17, 3); 2071 2072 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2073 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2074 glTranslatef(-17.0, 2.0, 0.0); 2075 glColor4f(1.0, 1.0, 1.0, 1.0); 2076 // 0 5 10 15 20 25 30 2077 print_text("Несмотря на странную форму ключа\n"~ 2078 " Диззи попробовал вставить её в\n"~ 2079 "замочную скважину. Непостижимым\n"~ 2080 " образом дверь отворилась."); 2081 } 2082 2083 glDisable(GL_COLOR_MATERIAL); 2084 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2085 break; 2086 2087 case STATE.MARTIAN_ENGINEER_GIVES_SPADE: 2088 glEnable(GL_COLOR_MATERIAL); 2089 2090 final switch(lang) 2091 { 2092 case dz.LANG.EN: 2093 show_dialback(12, 3, 21, 3, DIALOG_COLOR.GREEN); 2094 2095 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2096 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2097 glTranslatef(-11.0, 2.0, 0.0); 2098 glColor4f(1.0, 1.0, 1.0, 1.0); 2099 // 0 5 10 15 20 25 30 2100 print_text(" Your spade is ready, Dizzy!\n"~ 2101 "For ice don't worry, processed\n"~ 2102 "so that the heat of 500 degrees\n"~ 2103 " is not terrible.\n"); 2104 break; 2105 2106 case dz.LANG.RU: 2107 show_dialback(13, 3, 21, 3, DIALOG_COLOR.GREEN); 2108 2109 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2110 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2111 glTranslatef(-12.0, 2.0, 0.0); 2112 glColor4f(1.0, 1.0, 1.0, 1.0); 2113 // 0 5 10 15 20 25 30 2114 print_text(" Твоя лопата готова, Диззи!\n"~ 2115 "За лёд не беспокойся, обработано\n"~ 2116 " так что и жара в 500 градусов\n"~ 2117 " не страшна"); 2118 } 2119 2120 glDisable(GL_COLOR_MATERIAL); 2121 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2122 break; 2123 2124 case STATE.MARTIAN_ENGINEER_GIVES_WHISTLE: 2125 glEnable(GL_COLOR_MATERIAL); 2126 2127 final switch(lang) 2128 { 2129 case dz.LANG.EN: 2130 show_dialback(12, 3, 21, 3, DIALOG_COLOR.GREEN); 2131 2132 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2133 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2134 glTranslatef(-11.0, 2.0, 0.0); 2135 glColor4f(1.0, 1.0, 1.0, 1.0); 2136 // 0 5 10 15 20 25 30 2137 print_text(" So, take this whistle, Dizzy.\n"~ 2138 " Take everything you can carry\n"~ 2139 "with you, and go to the wizard,\n"~ 2140 " find shelter and whistle."); 2141 break; 2142 2143 case dz.LANG.RU: 2144 show_dialback(16, 3, 21, 3, DIALOG_COLOR.GREEN); 2145 2146 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2147 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2148 glTranslatef(-15.0, 2.0, 0.0); 2149 glColor4f(1.0, 1.0, 1.0, 1.0); 2150 // 0 5 10 15 20 25 30 2151 print_text(" Вот, возьми этот свисток, Диззи.\n"~ 2152 "Бери с собой всё что можешь унести,\n"~ 2153 " и иди к волшебнику, найди себе\n"~ 2154 " укрытие и свистни."); 2155 } 2156 2157 glDisable(GL_COLOR_MATERIAL); 2158 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2159 break; 2160 2161 2162 case STATE.DIZZY_DIG_MESSAGE: 2163 glEnable(GL_COLOR_MATERIAL); 2164 2165 final switch(lang) 2166 { 2167 case dz.LANG.EN: 2168 show_dialback(12, 2, 11, 1); 2169 2170 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2171 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2172 glTranslatef(-11.0, 1.0, 0.0); 2173 glColor4f(1.0, 1.0, 1.0, 1.0); 2174 // 0 5 10 15 20 25 30 2175 print_text("Dizzy started to dig."); 2176 break; 2177 2178 case dz.LANG.RU: 2179 show_dialback(10, 2, 10, 1); 2180 2181 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2182 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2183 glTranslatef(-9.0, 1.0, 0.0); 2184 glColor4f(1.0, 1.0, 1.0, 1.0); 2185 // 0 5 10 15 20 25 30 2186 print_text("Диззи начал копать"); 2187 } 2188 2189 glDisable(GL_COLOR_MATERIAL); 2190 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2191 break; 2192 2193 case STATE.DIZZY_PUT_STONE_MESSAGE: 2194 glEnable(GL_COLOR_MATERIAL); 2195 2196 final switch(lang) 2197 { 2198 case dz.LANG.EN: 2199 show_dialback(9, 2, 9, 1); 2200 2201 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2202 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2203 glTranslatef(-8.0, 1.0, 0.0); 2204 glColor4f(1.0, 1.0, 1.0, 1.0); 2205 // 0 5 10 15 20 25 30 2206 print_text("Dizzy put stone."); 2207 break; 2208 2209 case dz.LANG.RU: 2210 show_dialback(13, 2, 12, 1); 2211 2212 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2213 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2214 glTranslatef(-12.0, 1.0, 0.0); 2215 glColor4f(1.0, 1.0, 1.0, 1.0); 2216 // 0 5 10 15 20 25 30 2217 print_text("Диззи установил камень."); 2218 } 2219 2220 glDisable(GL_COLOR_MATERIAL); 2221 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2222 break; 2223 2224 case STATE.DIZZY_TRY_CATCH_BUG_MESSAGE: 2225 glEnable(GL_COLOR_MATERIAL); 2226 2227 final switch(lang) 2228 { 2229 case dz.LANG.EN: 2230 show_dialback(16, 3, 15, 2); 2231 2232 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2233 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2234 glTranslatef(-15.0, 2.0, 0.0); 2235 glColor4f(1.0, 1.0, 1.0, 1.0); 2236 // 0 5 10 15 20 25 30 2237 print_text("Dizzy tried to put the nettle\n"~ 2238 " on the bug, but it was too\n"~ 2239 " provoked."); 2240 break; 2241 2242 case dz.LANG.RU: 2243 show_dialback(17, 3, 17, 2); 2244 2245 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2246 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2247 glTranslatef(-16.0, 2.0, 0.0); 2248 glColor4f(1.0, 1.0, 1.0, 1.0); 2249 // 0 5 10 15 20 25 30 2250 print_text(" Диззи попытался накинуть сачок\n"~ 2251 "на жука, но тот оказался слишком\n"~ 2252 " проворен."); 2253 } 2254 2255 glDisable(GL_COLOR_MATERIAL); 2256 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2257 break; 2258 2259 case STATE.DIZZY_CATCH_BUG_MESSAGE: 2260 glEnable(GL_COLOR_MATERIAL); 2261 2262 final switch(lang) 2263 { 2264 case dz.LANG.EN: 2265 show_dialback(20, 2, 20, 2); 2266 2267 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2268 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2269 glTranslatef(-19.0, 1.0, 0.0); 2270 glColor4f(1.0, 1.0, 1.0, 1.0); 2271 // 0 5 10 15 20 25 30 2272 print_text("By some miracle, standing with one leg\n"~ 2273 " on the ice, Dizzy caught the bug."); 2274 break; 2275 2276 case dz.LANG.RU: 2277 show_dialback(18, 2, 18, 2); 2278 2279 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2280 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2281 glTranslatef(-17.0, 1.0, 0.0); 2282 glColor4f(1.0, 1.0, 1.0, 1.0); 2283 // 0 5 10 15 20 25 30 2284 print_text("Каким-то чудом, стоя на одной ноге\n"~ 2285 " на льду, Диззи поймал жука."); 2286 } 2287 2288 glDisable(GL_COLOR_MATERIAL); 2289 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2290 break; 2291 2292 case STATE.DIZZY_CATCH_FISH_MESSAGE: 2293 glEnable(GL_COLOR_MATERIAL); 2294 2295 final switch(lang) 2296 { 2297 case dz.LANG.EN: 2298 show_dialback(18, 3, 17, 2); 2299 2300 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2301 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2302 glTranslatef(-17.0, 2.0, 0.0); 2303 glColor4f(1.0, 1.0, 1.0, 1.0); 2304 // 0 5 10 15 20 25 30 2305 print_text("Planting the bug as a bait, Dizzy\n"~ 2306 "began to fish. Soon it bite, and\n"~ 2307 " Dizzy took out the fish."); 2308 break; 2309 2310 case dz.LANG.RU: 2311 show_dialback(18, 3, 17, 3); 2312 2313 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2314 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2315 glTranslatef(-17.0, 2.0, 0.0); 2316 glColor4f(1.0, 1.0, 1.0, 1.0); 2317 // 0 5 10 15 20 25 30 2318 print_text("Насадив жука на крючок в качестве\n"~ 2319 " приманки, Диззи начал удить...\n"~ 2320 " Вскоре клюнуло и Диззи достал\n"~ 2321 " рыбу."); 2322 } 2323 2324 glDisable(GL_COLOR_MATERIAL); 2325 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2326 break; 2327 2328 case STATE.DIZZY_CATCH_SQUID_MESSAGE: 2329 glEnable(GL_COLOR_MATERIAL); 2330 2331 final switch(lang) 2332 { 2333 case dz.LANG.EN: 2334 show_dialback(20, 3, 19, 2); 2335 2336 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2337 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2338 glTranslatef(-19.0, 2.0, 0.0); 2339 glColor4f(1.0, 1.0, 1.0, 1.0); 2340 // 0 5 10 15 20 25 30 2341 print_text("By luring squid promising delicacy in\n"~ 2342 " the form of fish, Dizzy deftly\n"~ 2343 " tied its limbs with the rope."); 2344 break; 2345 2346 case dz.LANG.RU: 2347 show_dialback(17, 3, 17, 3); 2348 2349 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2350 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2351 glTranslatef(-16.0, 2.0, 0.0); 2352 glColor4f(1.0, 1.0, 1.0, 1.0); 2353 // 0 5 10 15 20 25 30 2354 print_text("Приманив кальмара многообещающим\n"~ 2355 " лакомством в виде рыбки, Диззи\n"~ 2356 " ловко перевязал ему конечности\n"~ 2357 " верёвкой."); 2358 } 2359 2360 glDisable(GL_COLOR_MATERIAL); 2361 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2362 break; 2363 2364 case STATE.BAG_FOUND: 2365 glEnable(GL_COLOR_MATERIAL); 2366 2367 final switch(lang) 2368 { 2369 case dz.LANG.EN: 2370 show_dialback(12, 3, 11, 2); 2371 2372 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2373 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2374 glTranslatef(-11.0, 2.0, 0.0); 2375 glColor4f(1.0, 1.0, 1.0, 1.0); 2376 // 0 5 10 15 20 25 30 2377 print_text("You have found a bag.\n"~ 2378 " Now you can carry\n"~ 2379 " more items"); 2380 break; 2381 2382 case dz.LANG.RU: 2383 show_dialback(12, 3, 12, 2); 2384 2385 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2386 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2387 glTranslatef(-11.0, 2.0, 0.0); 2388 glColor4f(1.0, 1.0, 1.0, 1.0); 2389 // 0 5 10 15 20 25 30 2390 print_text(" Вы нашли сумку.\n"~ 2391 "Теперь вы можете нести\n"~ 2392 " больше предметов"); 2393 } 2394 2395 glDisable(GL_COLOR_MATERIAL); 2396 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2397 break; 2398 2399 case STATE.DIZZY_DIG2_MESSAGE: 2400 glEnable(GL_COLOR_MATERIAL); 2401 2402 final switch(lang) 2403 { 2404 case dz.LANG.EN: 2405 show_dialback(9, 2, 8, 1); 2406 2407 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2408 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2409 glTranslatef(-8.0, 1.0, 0.0); 2410 glColor4f(1.0, 1.0, 1.0, 1.0); 2411 // 0 5 10 15 20 25 30 2412 print_text("Dizzy dug a pit"); 2413 break; 2414 2415 case dz.LANG.RU: 2416 show_dialback(9, 2, 8, 1); 2417 2418 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2419 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2420 glTranslatef(-8.0, 1.0, 0.0); 2421 glColor4f(1.0, 1.0, 1.0, 1.0); 2422 // 0 5 10 15 20 25 30 2423 print_text("Диззи отрыл яму"); 2424 } 2425 2426 glDisable(GL_COLOR_MATERIAL); 2427 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2428 break; 2429 2430 case STATE.DIZZY_DIG3_MESSAGE: 2431 glEnable(GL_COLOR_MATERIAL); 2432 2433 final switch(lang) 2434 { 2435 case dz.LANG.EN: 2436 show_dialback(12, 11, 8, 1); 2437 2438 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2439 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2440 glTranslatef(-11.0, 1.0, 0.0); 2441 glColor4f(1.0, 1.0, 1.0, 1.0); 2442 // 0 5 10 15 20 25 30 2443 print_text("Dizzy dug the shelter"); 2444 break; 2445 2446 case dz.LANG.RU: 2447 show_dialback(14, 2, 14, 1); 2448 2449 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2450 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2451 glTranslatef(-13.0, 1.0, 0.0); 2452 glColor4f(1.0, 1.0, 1.0, 1.0); 2453 // 0 5 10 15 20 25 30 2454 print_text("Диззи откопал себе укрытие"); 2455 } 2456 2457 glDisable(GL_COLOR_MATERIAL); 2458 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2459 break; 2460 2461 2462 case STATE.DIZZY_TRIES_TO_GET_WATER: 2463 glEnable(GL_COLOR_MATERIAL); 2464 2465 final switch(lang) 2466 { 2467 case dz.LANG.EN: 2468 show_dialback(18, 4, 17, 3); 2469 2470 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2471 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2472 glTranslatef(-17.0, 3.0, 0.0); 2473 glColor4f(1.0, 1.0, 1.0, 1.0); 2474 // 0 5 10 15 20 25 30 2475 print_text("Dizzy tried to collect water, but\n"~ 2476 " it seeped through the metal.\n"~ 2477 " Also Dizzy noticed that on\n"~ 2478 " the ground the water was kept\n"~ 2479 " a little."); 2480 break; 2481 2482 case dz.LANG.RU: 2483 show_dialback(17, 4, 17, 3); 2484 2485 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2486 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2487 glTranslatef(-16.0, 3.0, 0.0); 2488 glColor4f(1.0, 1.0, 1.0, 1.0); 2489 // 0 5 10 15 20 25 30 2490 print_text(" Диззи попытался набрать воды,\n"~ 2491 "однако та просачивалась сквозь\n"~ 2492 "металл. Но всё же Диззи заметил,\n"~ 2493 " что на почве вода немного\n"~ 2494 " удерживалась"); 2495 } 2496 2497 glDisable(GL_COLOR_MATERIAL); 2498 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2499 break; 2500 2501 case STATE.DIZZY_PUT_GROUND_TO_THE_BUCKET: 2502 glEnable(GL_COLOR_MATERIAL); 2503 2504 final switch(lang) 2505 { 2506 case dz.LANG.EN: 2507 show_dialback(17, 2, 16, 2); 2508 2509 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2510 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2511 glTranslatef(-16.0, 1.0, 0.0); 2512 glColor4f(1.0, 1.0, 1.0, 1.0); 2513 // 0 5 10 15 20 25 30 2514 print_text("Dizzy tightly packed the bottom\n"~ 2515 "of the bucket with dense ground."); 2516 break; 2517 2518 case dz.LANG.RU: 2519 show_dialback(16, 2, 15, 2); 2520 2521 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2522 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2523 glTranslatef(-15.0, 1.0, 0.0); 2524 glColor4f(1.0, 1.0, 1.0, 1.0); 2525 // 0 5 10 15 20 25 30 2526 print_text("Диззи плотно уложил дно ведра\n"~ 2527 " рыхлой землёй."); 2528 } 2529 2530 glDisable(GL_COLOR_MATERIAL); 2531 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2532 break; 2533 2534 case STATE.DIZZY_GET_LIGHT_WATER: 2535 glEnable(GL_COLOR_MATERIAL); 2536 2537 final switch(lang) 2538 { 2539 case dz.LANG.EN: 2540 show_dialback(15, 2, 15, 2); 2541 2542 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2543 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2544 glTranslatef(-14.0, 1.0, 0.0); 2545 glColor4f(1.0, 1.0, 1.0, 1.0); 2546 // 0 5 10 15 20 25 30 2547 print_text("Dizzy took a little water to\n"~ 2548 " the bucket."); 2549 break; 2550 2551 case dz.LANG.RU: 2552 show_dialback(18, 2, 18, 1); 2553 2554 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2555 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2556 glTranslatef(-17.0, 1.0, 0.0); 2557 glColor4f(1.0, 1.0, 1.0, 1.0); 2558 // 0 5 10 15 20 25 30 2559 print_text("Диззи набрал немного воды в ведро."); 2560 } 2561 2562 glDisable(GL_COLOR_MATERIAL); 2563 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2564 break; 2565 2566 case STATE.DIZZY_SPRAYED_BUG_MESSAGE: 2567 glEnable(GL_COLOR_MATERIAL); 2568 2569 final switch(lang) 2570 { 2571 case dz.LANG.EN: 2572 show_dialback(12, 2, 12, 1); 2573 2574 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2575 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2576 glTranslatef(-11.0, 1.0, 0.0); 2577 glColor4f(1.0, 1.0, 1.0, 1.0); 2578 // 0 5 10 15 20 25 30 2579 print_text("Dizzy sprayed the bug."); 2580 break; 2581 2582 case dz.LANG.RU: 2583 show_dialback(12, 2, 11, 1); 2584 2585 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2586 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2587 glTranslatef(-11.0, 1.0, 0.0); 2588 glColor4f(1.0, 1.0, 1.0, 1.0); 2589 // 0 5 10 15 20 25 30 2590 print_text("Диззи побрызгал жука."); 2591 } 2592 2593 glDisable(GL_COLOR_MATERIAL); 2594 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2595 break; 2596 2597 case STATE.DIZZY_SPRAYED_GRASSHOPPER_MESSAGE: 2598 glEnable(GL_COLOR_MATERIAL); 2599 2600 final switch(lang) 2601 { 2602 case dz.LANG.EN: 2603 show_dialback(16, 2, 16, 1); 2604 2605 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2606 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2607 glTranslatef(-15.0, 1.0, 0.0); 2608 glColor4f(1.0, 1.0, 1.0, 1.0); 2609 // 0 5 10 15 20 25 30 2610 print_text("Dizzy sprayed the grasshopper."); 2611 break; 2612 2613 case dz.LANG.RU: 2614 show_dialback(14, 2, 14, 1); 2615 2616 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2617 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2618 glTranslatef(-13.0, 1.0, 0.0); 2619 glColor4f(1.0, 1.0, 1.0, 1.0); 2620 // 0 5 10 15 20 25 30 2621 print_text("Диззи побрызгал кузнечика."); 2622 } 2623 2624 glDisable(GL_COLOR_MATERIAL); 2625 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2626 break; 2627 2628 case STATE.NOT_ALL_ITEMS_IN_THE_CASTLE_MESSAGE: 2629 glEnable(GL_COLOR_MATERIAL); 2630 2631 final switch(lang) 2632 { 2633 case dz.LANG.EN: 2634 show_dialback(18, 2, 18, 2); 2635 2636 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2637 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2638 glTranslatef(-17.0, 1.0, 0.0); 2639 glColor4f(1.0, 1.0, 1.0, 1.0); 2640 // 0 5 10 15 20 25 30 2641 print_text("\"I have not transferred all things\n"~ 2642 " to the castle,\" thought Dizzy."); 2643 break; 2644 2645 case dz.LANG.RU: 2646 show_dialback(14, 2, 14, 2); 2647 2648 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2649 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2650 glTranslatef(-13.0, 1.0, 0.0); 2651 glColor4f(1.0, 1.0, 1.0, 1.0); 2652 // 0 5 10 15 20 25 30 2653 print_text("\"Я перенёс ещё не все вещи\n"~ 2654 "в замок\", - подумал Диззи"); 2655 } 2656 2657 glDisable(GL_COLOR_MATERIAL); 2658 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2659 break; 2660 2661 case STATE.ROPE_NOT_IN_THE_CASTLE_MESSAGE: 2662 glEnable(GL_COLOR_MATERIAL); 2663 2664 final switch(lang) 2665 { 2666 case dz.LANG.EN: 2667 show_dialback(12, 2, 12, 1); 2668 2669 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2670 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2671 glTranslatef(-11.0, 1.0, 0.0); 2672 glColor4f(1.0, 1.0, 1.0, 1.0); 2673 // 0 5 10 15 20 25 30 2674 print_text("\"The last thing left!\""); 2675 break; 2676 2677 case dz.LANG.RU: 2678 show_dialback(14, 2, 14, 1); 2679 2680 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2681 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2682 glTranslatef(-13.0, 1.0, 0.0); 2683 glColor4f(1.0, 1.0, 1.0, 1.0); 2684 // 0 5 10 15 20 25 30 2685 print_text("\"Осталась последняя вещь!\""); 2686 } 2687 2688 glDisable(GL_COLOR_MATERIAL); 2689 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2690 break; 2691 2692 case STATE.DIZZY_WHISTLE_MESSAGE: 2693 glEnable(GL_COLOR_MATERIAL); 2694 2695 final switch(lang) 2696 { 2697 case dz.LANG.EN: 2698 show_dialback(11, 2, 11, 1); 2699 2700 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2701 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2702 glTranslatef(-10.0, 1.0, 0.0); 2703 glColor4f(1.0, 1.0, 1.0, 1.0); 2704 // 0 5 10 15 20 25 30 2705 print_text("Dizzy whistle and..."); 2706 break; 2707 2708 case dz.LANG.RU: 2709 show_dialback(11, 2, 10, 1); 2710 2711 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2712 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2713 glTranslatef(-10.0, 1.0, 0.0); 2714 glColor4f(1.0, 1.0, 1.0, 1.0); 2715 // 0 5 10 15 20 25 30 2716 print_text("Диззи свистнул и..."); 2717 } 2718 2719 glDisable(GL_COLOR_MATERIAL); 2720 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2721 break; 2722 2723 case STATE.STONES_CRASHES_MESSAGE: 2724 glEnable(GL_COLOR_MATERIAL); 2725 2726 final switch(lang) 2727 { 2728 case dz.LANG.EN: 2729 show_dialback(17, 2, 16, 1); 2730 2731 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2732 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2733 glTranslatef(-16.0, 1.0, 0.0); 2734 glColor4f(1.0, 1.0, 1.0, 1.0); 2735 // 0 5 10 15 20 25 30 2736 print_text("Above heard the roar of stones."); 2737 break; 2738 2739 case dz.LANG.RU: 2740 show_dialback(18, 2, 17, 1); 2741 2742 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2743 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2744 glTranslatef(-17.0, 1.0, 0.0); 2745 glColor4f(1.0, 1.0, 1.0, 1.0); 2746 // 0 5 10 15 20 25 30 2747 print_text("Наверху послышался грохот камней."); 2748 } 2749 2750 glDisable(GL_COLOR_MATERIAL); 2751 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2752 break; 2753 2754 case STATE.MARTIAN_CHEMIST_NO_BIRD: 2755 glEnable(GL_COLOR_MATERIAL); 2756 2757 final switch(lang) 2758 { 2759 case dz.LANG.EN: 2760 show_dialback(5, 3, 21, 1, DIALOG_COLOR.GREEN); 2761 2762 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2763 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2764 glTranslatef(-4.0, 2.0, 0.0); 2765 glColor4f(1.0, 1.0, 1.0, 1.0); 2766 // 0 5 10 15 20 25 30 2767 print_text("Grasshopper is good, but\n"~ 2768 " where bird?"); 2769 break; 2770 2771 case dz.LANG.RU: 2772 show_dialback(6, 3, 21, 1, DIALOG_COLOR.GREEN); 2773 2774 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2775 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2776 glTranslatef(-5.0, 2.0, 0.0); 2777 glColor4f(1.0, 1.0, 1.0, 1.0); 2778 // 0 5 10 15 20 25 30 2779 print_text("Кузнечик - это хорошо, но\n"~ 2780 " где птица?"); 2781 } 2782 2783 glDisable(GL_COLOR_MATERIAL); 2784 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2785 break; 2786 2787 case STATE.MARTIAN_CHEMIST_NO_GRASSHOPPER: 2788 glEnable(GL_COLOR_MATERIAL); 2789 2790 final switch(lang) 2791 { 2792 case dz.LANG.EN: 2793 show_dialback(4, 3, 21, 1, DIALOG_COLOR.GREEN); 2794 2795 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2796 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2797 glTranslatef(-3.0, 2.0, 0.0); 2798 glColor4f(1.0, 1.0, 1.0, 1.0); 2799 // 0 5 10 15 20 25 30 2800 print_text("The poison is good, but\n"~ 2801 " where grasshopper?"); 2802 break; 2803 2804 case dz.LANG.RU: 2805 show_dialback(4, 3, 21, 1, DIALOG_COLOR.GREEN); 2806 2807 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2808 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2809 glTranslatef(-3.0, 2.0, 0.0); 2810 glColor4f(1.0, 1.0, 1.0, 1.0); 2811 // 0 5 10 15 20 25 30 2812 print_text("Отрава - это хорошо, но\n"~ 2813 " где сам кузнечик?"); 2814 } 2815 2816 glDisable(GL_COLOR_MATERIAL); 2817 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2818 break; 2819 2820 case STATE.MARTIAN_CHEMIST_NO_GRASSHOPPERS_POISON: 2821 glEnable(GL_COLOR_MATERIAL); 2822 2823 final switch(lang) 2824 { 2825 case dz.LANG.EN: 2826 show_dialback(6, 3, 21, 1, DIALOG_COLOR.GREEN); 2827 2828 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2829 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2830 glTranslatef(-5.0, 2.0, 0.0); 2831 glColor4f(1.0, 1.0, 1.0, 1.0); 2832 // 0 5 10 15 20 25 30 2833 print_text(" Bird is good, but\n"~ 2834 "where grasshopper poison?"); 2835 break; 2836 2837 case dz.LANG.RU: 2838 show_dialback(7, 3, 21, 1, DIALOG_COLOR.GREEN); 2839 2840 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2841 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2842 glTranslatef(-6.0, 2.0, 0.0); 2843 glColor4f(1.0, 1.0, 1.0, 1.0); 2844 // 0 5 10 15 20 25 30 2845 print_text(" Птица - это хорошо, но\n"~ 2846 "где отрава для кузнечиков?"); 2847 } 2848 2849 glDisable(GL_COLOR_MATERIAL); 2850 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2851 break; 2852 2853 case STATE.MARTIAN_CHEMIST_NO_BUG: 2854 glEnable(GL_COLOR_MATERIAL); 2855 2856 final switch(lang) 2857 { 2858 case dz.LANG.EN: 2859 show_dialback(4, 3, 21, 1, DIALOG_COLOR.GREEN); 2860 2861 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2862 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2863 glTranslatef(-3.0, 2.0, 0.0); 2864 glColor4f(1.0, 1.0, 1.0, 1.0); 2865 // 0 5 10 15 20 25 30 2866 print_text("The poison is good, but\n"~ 2867 " where bug?"); 2868 break; 2869 2870 case dz.LANG.RU: 2871 show_dialback(4, 3, 21, 1, DIALOG_COLOR.GREEN); 2872 2873 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2874 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2875 glTranslatef(-3.0, 2.0, 0.0); 2876 glColor4f(1.0, 1.0, 1.0, 1.0); 2877 // 0 5 10 15 20 25 30 2878 print_text("Отрава - это хорошо, но\n"~ 2879 " где сам жук?"); 2880 } 2881 2882 glDisable(GL_COLOR_MATERIAL); 2883 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2884 break; 2885 2886 case STATE.MARTIAN_CHEMIST_NO_FISH: 2887 glEnable(GL_COLOR_MATERIAL); 2888 2889 final switch(lang) 2890 { 2891 case dz.LANG.EN: 2892 show_dialback(1, 3, 21, 1, DIALOG_COLOR.GREEN); 2893 2894 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2895 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2896 glTranslatef(-0.0, 2.0, 0.0); 2897 glColor4f(1.0, 1.0, 1.0, 1.0); 2898 // 0 5 10 15 20 25 30 2899 print_text("The bug is good, but\n"~ 2900 " where fish?"); 2901 break; 2902 2903 case dz.LANG.RU: 2904 show_dialback(1, 3, 21, 1, DIALOG_COLOR.GREEN); 2905 2906 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2907 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2908 glTranslatef(-0.0, 2.0, 0.0); 2909 glColor4f(1.0, 1.0, 1.0, 1.0); 2910 // 0 5 10 15 20 25 30 2911 print_text("Жук - это хорошо, но\n"~ 2912 " где рыба?"); 2913 } 2914 2915 glDisable(GL_COLOR_MATERIAL); 2916 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2917 break; 2918 2919 case STATE.MARTIAN_CHEMIST_NO_SQUID: 2920 glEnable(GL_COLOR_MATERIAL); 2921 2922 final switch(lang) 2923 { 2924 case dz.LANG.EN: 2925 show_dialback(2, 3, 21, 1, DIALOG_COLOR.GREEN); 2926 2927 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2928 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2929 glTranslatef(-1.0, 2.0, 0.0); 2930 glColor4f(1.0, 1.0, 1.0, 1.0); 2931 // 0 5 10 15 20 25 30 2932 print_text("The fish is good, but\n"~ 2933 " where squid?"); 2934 break; 2935 2936 case dz.LANG.RU: 2937 show_dialback(2, 3, 21, 1, DIALOG_COLOR.GREEN); 2938 2939 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2940 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2941 glTranslatef(-1.0, 2.0, 0.0); 2942 glColor4f(1.0, 1.0, 1.0, 1.0); 2943 // 0 5 10 15 20 25 30 2944 print_text("Рыба - это хорошо, но\n"~ 2945 " где кальмар?"); 2946 } 2947 2948 glDisable(GL_COLOR_MATERIAL); 2949 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2950 break; 2951 2952 case STATE.MARTIAN_CHEMIST_NO_BUGS_POISON: 2953 glEnable(GL_COLOR_MATERIAL); 2954 2955 final switch(lang) 2956 { 2957 case dz.LANG.EN: 2958 show_dialback(3, 3, 21, 1, DIALOG_COLOR.GREEN); 2959 2960 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2961 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2962 glTranslatef(-2.0, 2.0, 0.0); 2963 glColor4f(1.0, 1.0, 1.0, 1.0); 2964 // 0 5 10 15 20 25 30 2965 print_text("The squid is good, but\n"~ 2966 " where bug poison?"); 2967 break; 2968 2969 case dz.LANG.RU: 2970 show_dialback(5, 3, 21, 1, DIALOG_COLOR.GREEN); 2971 2972 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2973 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2974 glTranslatef(-4.0, 2.0, 0.0); 2975 glColor4f(1.0, 1.0, 1.0, 1.0); 2976 // 0 5 10 15 20 25 30 2977 print_text("Кальмар - это хорошо, но\n"~ 2978 " где отрава от жуков?"); 2979 } 2980 2981 glDisable(GL_COLOR_MATERIAL); 2982 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 2983 break; 2984 2985 case STATE.MARTIAN_CHEMIST_THANK_YOU: 2986 glEnable(GL_COLOR_MATERIAL); 2987 2988 final switch(lang) 2989 { 2990 case dz.LANG.EN: 2991 show_dialback(10, 2, 21, 1, DIALOG_COLOR.GREEN); 2992 2993 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 2994 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 2995 glTranslatef(-9.0, 1.0, 0.0); 2996 glColor4f(1.0, 1.0, 1.0, 1.0); 2997 // 0 5 10 15 20 25 30 2998 print_text("Thank you, it is that needed."); 2999 break; 3000 3001 case dz.LANG.RU: 3002 show_dialback(8, 2, 21, 1, DIALOG_COLOR.GREEN); 3003 3004 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3005 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3006 glTranslatef(-7.0, 1.0, 0.0); 3007 glColor4f(1.0, 1.0, 1.0, 1.0); 3008 // 0 5 10 15 20 25 30 3009 print_text("Спасибо, это то, что нужно."); 3010 } 3011 3012 glDisable(GL_COLOR_MATERIAL); 3013 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 3014 break; 3015 3016 case STATE.MARTIAN_CHEMIST_NEED_WATER_FROM_LIGHT_TREE_CAVE: 3017 glEnable(GL_COLOR_MATERIAL); 3018 3019 final switch(lang) 3020 { 3021 case dz.LANG.EN: 3022 show_dialback(16, 2, 21, 3, DIALOG_COLOR.GREEN); 3023 3024 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3025 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3026 glTranslatef(-15.0, 1.0, 0.0); 3027 glColor4f(1.0, 1.0, 1.0, 1.0); 3028 // 0 5 10 15 20 25 30 3029 print_text(" Well done. Rest the last\n"~ 3030 " ingridient: bring, please,\n"~ 3031 "the water from the light tree cave."); 3032 break; 3033 3034 case dz.LANG.RU: 3035 show_dialback(12, 2, 21, 3, DIALOG_COLOR.GREEN); 3036 3037 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3038 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3039 glTranslatef(-11.0, 1.0, 0.0); 3040 glColor4f(1.0, 1.0, 1.0, 1.0); 3041 // 0 5 10 15 20 25 30 3042 print_text(" Отлично. Остался последний\n"~ 3043 "ингридиент: принеси, пожалуйста\n"~ 3044 " воды из пещеры сияющего дерева"); 3045 } 3046 3047 glDisable(GL_COLOR_MATERIAL); 3048 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 3049 break; 3050 3051 case STATE.MARTIAN_CHEMIST_GIVES_PSYCHOTROPIC_SPRAY: 3052 glEnable(GL_COLOR_MATERIAL); 3053 3054 final switch(lang) 3055 { 3056 case dz.LANG.EN: 3057 show_dialback(19, 5, 21, 5, DIALOG_COLOR.GREEN); 3058 3059 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3060 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3061 glTranslatef(-18.0, 4.0, 0.0); 3062 glColor4f(1.0, 1.0, 1.0, 1.0); 3063 // 0 5 10 15 20 25 30 3064 print_text(" Well? Now we will do so... Done!\n"~ 3065 " With this thing it is necessary to\n"~ 3066 "sprinkle pests, further instructions\n"~ 3067 " you will receive from the engineer.\n"~ 3068 "But hurry up! A huge meteorite crashed\n"~ 3069 " into the castle and broke the wall.\n"~ 3070 "I blocked some of the passages, but\n"~ 3071 " the air continues to leak."); 3072 break; 3073 3074 case dz.LANG.RU: 3075 show_dialback(10, 6, 21, 6, DIALOG_COLOR.GREEN); 3076 3077 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3078 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3079 glTranslatef(-9.0, 5.0, 0.0); 3080 glColor4f(1.0, 1.0, 1.0, 1.0); 3081 // 0 5 10 15 20 25 30 3082 print_text(" Что ж? Сейчас мы немного\n"~ 3083 " поколдуем... Вот готово!\n"~ 3084 " Этой штукой надо побрызгать\n"~ 3085 " вредителей, дальнейшие\n"~ 3086 " инструкции ты получишь от\n"~ 3087 "инженера. Но поспеши! В замок\n"~ 3088 " врезался огромный метеорит\n"~ 3089 " и проломил стену. Я перекрыл\n"~ 3090 " некоторые ходы, но воздух\n"~ 3091 " продолжает утекать."); 3092 } 3093 3094 glDisable(GL_COLOR_MATERIAL); 3095 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 3096 break; 3097 3098 case STATE.ZAKS_SAYS_FAREWELL_WORD: 3099 glEnable(GL_COLOR_MATERIAL); 3100 3101 final switch(lang) 3102 { 3103 case dz.LANG.EN: 3104 show_dialback(11, 3, 21, 2, DIALOG_COLOR.RED); 3105 3106 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3107 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3108 glTranslatef(-10.0, 2.0, 0.0); 3109 glColor4f(1.0, 1.0, 1.0, 1.0); 3110 // 0 5 10 15 20 25 30 3111 print_text(" Oh, you little bastard!\n"~ 3112 "OK, I'm leaving. But you never\n"~ 3113 " get out of here! Ha ha ha ha.\n"); 3114 break; 3115 3116 case dz.LANG.RU: 3117 show_dialback(11, 3, 21, 2, DIALOG_COLOR.RED); 3118 3119 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3120 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3121 glTranslatef(-10.0, 2.0, 0.0); 3122 glColor4f(1.0, 1.0, 1.0, 1.0); 3123 // 0 5 10 15 20 25 30 3124 print_text("Ах ты гадёныш! Хорошо я ухожу.\n"~ 3125 " Но тебе никогда не выбраться\n"~ 3126 " отсюда. Ха-ха-ха-ха!"); 3127 } 3128 3129 glDisable(GL_COLOR_MATERIAL); 3130 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 3131 break; 3132 3133 case STATE.TO_BE_CONTINUED_MESSAGE: 3134 glEnable(GL_COLOR_MATERIAL); 3135 3136 final switch(lang) 3137 { 3138 case dz.LANG.EN: 3139 show_dialback(14, 3, 14, 3); 3140 3141 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3142 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3143 glTranslatef(-13.0, 2.0, 0.0); 3144 glColor4f(1.0, 1.0, 1.0, 1.0); 3145 // 0 5 10 15 20 25 30 3146 print_text("The next screen not ready.\n"~ 3147 " Please save, and check\n"~ 3148 " status of new version on\n"~ 3149 " site: dizzy-omega.sf.net"); 3150 break; 3151 3152 case dz.LANG.RU: 3153 show_dialback(14, 3, 13, 3); 3154 3155 glBindTexture(GL_TEXTURE_2D, dz.textures["font"]); 3156 glBlendFunc(GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR); 3157 glTranslatef(-13.0, 2.0, 0.0); 3158 glColor4f(1.0, 1.0, 1.0, 1.0); 3159 // 0 5 10 15 20 25 30 3160 print_text(" Далее игра не готова.\n"~ 3161 " Сохранитесь и проверяйте\n"~ 3162 " статус новой версии на\n"~ 3163 "сайте: dizzy-omega.sf.net"); 3164 } 3165 3166 glDisable(GL_COLOR_MATERIAL); 3167 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 3168 break; 3169 3170 case STATE.DIZZY_DIG_ANIM: 3171 break; 3172 } 3173 } 3174 3175 override bool tick(GlobalState gs) 3176 { 3177 color++; 3178 return true; 3179 } 3180 } 3181